(SOLVED) Local Server public IP error

Hello to all
sorry for my english (Google translated)

I need some advice because I can not solve this problem:
I realized a Blynk server at home with Orange-pi-PC (Ubuntu mate, static ip 192.168.1.200) and it works ok!
Smartphone app of Blynk if I enter the local ip in my case 192.168.1.200 everything works ok Blynk connected!
If I enter instead direct public IP as 37.159.49.XX (or DDNS domain) on the app appears error “Please check authentication tokens”.
I configured the router looks good traffic 8441 8442 8443 doors is redirected to the … ip 192.168.1.200 server seems to work, in fact, the app says “Please check authentication token” and not in connection … so I it seems that the arrivals traffic until the server but that if they are external connections to the lan does not make me access.
There is something to be set on Blynk server? I something wrong?
Thank you all in advance

Have you tried creating a new account and obtaining a new token based on the error message you are receiving? You are obviously connecting to the server if you are seeing the “token” message.

When you try to create a new account I immediately responds “Please check authentication token” and even if I try with existing user!
If I put on the app local ip okay …

thanks Costas

Can you paste the logs from the server as that might give us a clue what the problem is.

Of course later the public log … thanks meanwhile

LOG:
Public IP : 79.46.180.21

2017-03-02 21:47:00.635 INFO - Initializing gmail smtp mail transport. Username : example@gmail.com. SMTP host : smtp.gmail.com:587
2017-03-02 21:47:00.853 WARN - ATTENTION. Certificate /home/orangepi and key /home/orangepi paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
2017-03-02 21:47:02.935 WARN - ATTENTION. Server certificate paths cert : ‘/home/orangepi’, key : ‘/home/orangepi’ - not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
2017-03-02 21:47:04.768 WARN - ATTENTION. Certificate /home/orangepi and key /home/orangepi paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
2017-03-02 21:47:06.106 WARN - ATTENTION. Certificate /home/orangepi and key /home/orangepi paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
2017-03-02 21:47:07.874 WARN - ATTENTION. Certificate /home/orangepi and key /home/orangepi paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
2017-03-02 21:47:09.531 WARN - Failed to find a usable hardware address from the network interfaces; using random bytes: a3:56:87:b3:bc:5d:6c:b9
2017-03-02 21:47:09.780 INFO - Hardware plain tcp/ip server listening at 8442 port.
2017-03-02 21:47:09.788 INFO - Hardware SSL server listening at 8441 port.
2017-03-02 21:47:09.791 INFO - Application server listening at 8443 port.
2017-03-02 21:47:09.794 INFO - HTTP API server listening at 8080 port.
2017-03-02 21:47:09.796 INFO - HTTPS API server listening at 9443 port.
2017-03-02 21:47:09.802 INFO - HTTPS Admin UI server listening at 7443 port.
2017-03-02 21:47:09.805 INFO - Web Sockets server listening at 8082 port.
2017-03-02 21:47:09.808 INFO - Web SSL Sockets server listening at 8081 port.
2017-03-02 21:47:09.812 INFO - Mqtt hardware server listening at 8440 port.
2017-03-02 21:58:53.834 WARN - Hardware not logged. /79.46.180.21:59848. Closing.
2017-03-02 22:00:10.425 WARN - Hardware not logged. /79.46.180.21:59973. Closing.

Config router port forwarding

Here is the result with Blynk app if I enter public IP es: 79.46.180.21.
If I insert internal lan ip 192.68.1.200 is all ok!
Some idea? thank you

You can’t connect from within local network to public IP.

Yes you can, but your router has to support local loopback :slight_smile:

1 Like

No with the smartphone is not connected to the local network!
It is connected with the public IP network as shown gsm.
thanks to both

Stupid question, but is your auth token from project and local server the same?

thanks Lichtsignaal
There is not even a project with the token as I can not access the app to the server, you do not even manage to register a new user, maybe I’m missing something, I’m sorry but it’s the first time I try a local server, because by token error before making a project? and even before you log on to the server and create a user? because error token?
It could be the router that does not properly forward traffic on port?

I think your router is setup properly. I assume you have things turned off now. I was trying to see if I could register an account at your server, for the sake of trying that is.

Do you have a server.properties file configured?

Wait… are you saying that you have not yet created an account on your local server?? If not, then do so when connected to the local IP address, before trying the added complexity of connecting via public IP.

Thats how I read it too… :anguished:

Thank you so much for your help Lichtsignaal. I keep turning on the server ip is: 80.183.31.195 if by chance you want to try again.

“Do you have a server.properties file configured?”
Yes file is present it I have not modified the default is as an example on the site
Thanks again.

Thanks or already tried inserting a local ip app works ok and I also made new user… but if I put on public ip app does not always work token error.

Sounds like you’re external IP does not forward to the correct local server in the internal network.

As the external IP should just be forwarding the connection and nothing else. If you are getting an incorrect token then you are not connecting to the same server as when you put in a local IP.

Thank you
Yes, right! but I do not enter any token. There no project no users no token, I’m not access, it seems like you say that is not redirected traffic on the server, but if I remove the rule from the router rightly the error is “connecting …”. Instead, with the active rule on the router the answer is “Please check authentication tokens” so the server responds! and traffic is forwarded properly! correct?
On the log of the server does not write anything belonging this:
WARN - Hardware not logged. /80.183.31.195:59973. Closing.
(I hope that with google translated it understands the meaning)

Not really making much sense, sorry.

Are you able to screenshot your router NAT/Port forwarding settings so we can check you have set them up correctly?