So - is it possible to access my Yun from outside my local network? I feel like I've exhausted my searches on forums and google, and still don't have an answer (it could be me)... There are various references, but nothing that seems to do what i am looking for.
I have had no problem in the past using port forwarding, etc for gaining access from outside my network using arduino uno's and ethernet shields - but this Yun is not cooperating with me.
Is it possible with the Yun? If so, what ports do i have to configure on my router? Do i do anything in the advanced configuration of my Yun (under port forwarding) to accomplish this? I have happy to fiddle around - I've been doing so for weeks now attempting to get this right, and have now reached the point of posting this...
notforyou23:
So - is it possible to access my Yun from outside my local network? I feel like I've exhausted my searches on forums and google, and still don't have an answer (it could be me)... There are various references, but nothing that seems to do what i am looking for.
I have had no problem in the past using port forwarding, etc for gaining access from outside my network using arduino uno's and ethernet shields - but this Yun is not cooperating with me.
Works just fine for me. But you're lacking quite a bit on details as to what exactly your problem is...
Is it possible with the Yun? If so, what ports do i have to configure on my router?
Well, those that you are trying to use. That's where you are a bit on the hazy side....
Also, are you sure that you are forwarding to the right (local) address of the Yun (wired vs. wireless)?
For my Arduino/Ethernet setups:
On my router (FIOS), I go to port forwarding and select the ip of the arduino uno/ethernet, choose custom ports, and enter the port i want to forward to (for example, port 23). I have DYNDNS to allow access from outside my local network.
So if i go to: http:mydyndnsaddress.org:23 I can access the device from anywhere.
With my Yun - i thought i could do the same thing (find the Yun's local ip, go to the FIOS router and port forward any port i wanted (port 45, as an example)). This doesn't work to get access to the Yun from outside my network (or inside for that matter).
If i type http:mydyndnsaddress.org:45 - nothing.
Is there a specific port on the Yun that i need to forward to or from? When I go to arduino.local it brings me right to the Yun's config page. if i go to arduino.local/sd it brings me to the index of the SD card. If i go to arduino.local/sd/mysketch it brings up the html file i have stored on the SD card (via sketch upload).
Let me know what other details may help if this is not enough detail.
As a first quick note, Dyn has stopped their free DynDNS service as of May 7th, 2014...
Otherwise, there is no difference between routing to the Yun or any other device, with the exception that I already noted, that you need to make sure that you are forwarding to the right internal IP.
Ralf
PS: Forwarding telnet (TCP/23) from the Internet to a local machine is a very bad ideaTM
A port forward has two sides. An outside IP and Port is mapped to an inside IP and Port. For traffic to flow, there must be an application listening on the inside IP and Port. By default, a web browser will attempt to connect to port 80, which is the default for HTTP traffic and indeed, the yun uhttpd web server process listens on port 80, by default.
So, if you want to use http://mydyndnsaddress.org:45 you need your router to forward port 45 to port 80
<router_wan_IP>:45 <-> <arduino_lan_ip>:80
This is killing me. What am i doing wrong here? I'd be happy to provide additional information, just let me know what would be needed to understand. Again, I am trying to access my Yun from outside my network, the same way I access my Uno/Ethernet shield.
I basically want to access a very simple webpage that is hosted on the Yun, and change a button state from that webpage.
Bottom-line is that the method I have used to great success with other devices simply does not work with the Yun. (I have been successful in port forwarding a handful of cameras, as well as a number of Arduino Unos/Ethernet). There must be something silly I am not doing, as it doesn't make sense.
Is the Yun a completely different animal altogether? What is the "right internal IP"?
Is there something in the sketch that I need to have in order to make this work? All of the examples provided are for access via the LAN - and specifically say that they wont look for outside connections.
notforyou23:
Is the Yun a completely different animal altogether?
No.
Well that is from a network point of view.
The yun is not a uno with ethernet shield. As such it is a completely different animal. -Which I think is good XD -
To access the web page of the yun you don't even need a sketch running on the leonardo.
Think of the yun as a PC with a arduino leonardo attached.
So to trouble shoot:
Can you access your pc from internet? If no you are doing something wrong. If yes: do the same for your yun.
notforyou23:
Is the Yun a completely different animal altogether?
No.
Well that is from a network point of view.
Correct. And he tries to access the web UI of the Yun, so...
The yun is not a uno with ethernet shield. As such it is a completely different animal. -Which I think is good XD -
To access the web page of the yun you don't even need a sketch running on the leonardo.
Well, he hasn't posted or even mentioned any sketch being involved. At least he hasn't really elaborated on me stating that his initial post is a bit on the hazy side as to what exactly he is trying to do.
But as far as the subject line of this thread goes, my statements still stand:
there is no difference on how you forward to either a Yun or an Uno with Ethernet shield
he needs to make sure he is using the right IP address, as the Yun has two, one for the Ethernet (wired) connection and one for the wireless. And he needs to forward to the one that connects his Yun to the Internet...
Jantje - thanks for pointing it out, that's helpful - I'm a novice, at best. the funny thing is - i can access my computer (Mac Mini) from the internet (outside my local network). I have a server running on it, no problem. For that - I forward port 80 on my FIOS router. I have other devices - webcams - i port forward, same way to 8XXX numbers. I have an arduino uno (sometimes two or three) and do the same thing. no problem. the Yun (I have a number of them) - Problem. I do the same thing with the FIOS router - port forwarding, but no access from outside. (I test "from the outside" by turning the wifi off on my iPhone/ipad. i confirm by accessing all my other devices, and then check the Yun. no luck).
I use "server.noListenOnLocalhost()" in the sketch. I also use "server.ListenOnLocalhost()" to no avail.
Don't get me wrong - I love the Yun, and can do a ton of things with it (I'm not even close to a 'trained' anything) - but only within my own internal network (unless I use temboo, thingspeak,, etc which i can and do..). I must be missing something.
Jantje:
So as long as you start talking about the sketch you will be confusing me and others.
Correct. The yun is running a webserver on usual port 80, despite of the sketch you uploaded. Since you are already forwarding from port 80 of your router to 80 of your macmini, I suppose you forwarded from port, say, 2000 of your router to port 80 of the yun, is that right?
There are a few options to achieve this without actually tinkering with your router and port forwarding them to your Arduino.
Option 1 - Yaler.net - Sign up and get either your PORT 80 or PORT 22 forwarded dynamically (without the need to do anything at your end on your router). So far, this is the only best option and here is a blog about how to set this up.
Option 2 - Hamachi by LogmeIn (Best VPN service. I use this for my Raspberry Pi to remote access my Pi from outside my network. However, I've not seen a working solution of Hamachi with Arduino Yun yet.
Option 3 - ngRok.com - Local tunneling. Works similar to Yaler.net. Not sure if it is available for Arduino Yun
Option 4 - ForwardHQ.com (formerly known as Showoff.io) - Works like Yaler. Not sure if it is available for Yun yet.
Option 5 - Localtunnel.me - Like Yaler and not sure about availability for Yun.
Interesting options, but it seems Yaler is pay-per-use?
I am currently using plain email to talk with the Yun. This is very simple and requires no router stuff, but as it requires the Yun polling it has the disadvantage of some delay.
sonnyyu:
...
4. Set VPN client at arduino tcp/ip shield.
...
I found out use PPTP client might be the most straightforward way to make Yun got public internet IP address. Very easy to get through NAT and Firewall.
opkg update
opkg install ppp-mod-pptp
opkg list |grep luci-proto-ppp
luci-proto-ppp - 0.11+svn10374-1
luci-proto-ppp - 0.11+svn10467-1 - Support for PPP/PPPoE/PPPoA/PPtP
opkg install luci-proto-ppp
will be failed. manually install it.
cd ~
wget http://downloads.arduino.cc/openwrtyun/1/packages/luci-proto-ppp_0.11%2Bsvn10467-1_ar71xx.ipk
opkg install luci-proto-ppp_0.11%2Bsvn10467-1_ar71xx.ipk