Go Down

Topic: Yun - access via internet (Read 2098 times) previous topic - next topic

game90

Hello everyone,

I made a sketch to get the values from a temperature sensor in my browser. Everything works fine if I call the YUN with the IP of my local network (http://192.168.xxx.xx/arduino/getTemp).
What do I have to do to access the YUN over the internet? I want to be able to read the sensor even if im not in my own network.
I tried now port forwarding in my router. But to which port on my YUN must I forward? 5555 (like in the documentation) isn't working. Also when I try to access http://192.168.xxx.xx:5555/arduino/getTemp it isn't working.
Can anybody help me please?

Thank you!

Kiros

Are you actually using 192.168.xxx.xx:5555 when trying to access it from the internet? If so, that isn't going to work. That is the IP address of the Yun on your LAN. You need to use the WAN IP of your router. That is the address that your router has on the internet. You can find it by hitting this site while on your LAN http://www.mywanip.com/ . If you have set your router to redirect port 5555 calls to your Yun then you should be able to take the WAN IP address of your router and tack on the 5555 port number. For example http://50.184.23.102:5555/arduino/getTemp

Kiros

game90

#2
Jan 26, 2014, 11:27 am Last Edit: Jan 26, 2014, 11:29 am by game90 Reason: 1
No, I tried it before with the WAN-IP but it was also not working.
I solved the problem now  :)
There were two problems:
1) You have to forward to port 80, not port 5555 (What is port 5555 for? If i post to  this port, my board will chrash and I have to reboot)
2) I always sent the http-posts to the wrong WAN-IP. I used this page: http://www.wieistmeineip.de/. But this page returns not the correct WAN-IP. Your posted page and http://www.whatismyip.com/ are correct.
Has anybody a clue why I get here different WAN-IPs?

bopeterson

I made a tutorial on how to access the Yun via internet without the need of port forwarding. It is availble at http://asynkronix.se/internet-of-things-with-arduino-yun-and-yaler/

Go Up