As I've mentioned in the past, the Ultra96 has become a permanent fixture on my home network and I've been developing my own set of custom web applications on its Python-based webserver. With my most recent webpage for tracking subway trains here in NYC (check it out here), the desire to access my Ultra96 when not connected to my home network became a strong desire.
Local IP addresses on a network are private from any external network. To be able to access a local host on a network from an external location somewhere on the Internet, port forwarding is used to route that incoming request from the Internet to the proper local IP address.
Port forwarding is a method of designating a particular port on the gateway of your network to allow for external communication with a particular service (private/local to your network) that has also been attached to that same port.
So to be able to access my Ultra96's webserver while not connected to my home network, I connected the it to port 80 since this is the port that a server is always listening to for web clients in the HTTP protocol structure.
To connect the Ultra96's webserver to port 80, I accessed my router's settings via my router's IP address through a browser, and created a new port forwarding rule. Luckily, most larger ISPs have developed user interfaces that make adding new settings like port forwarding rules less cumbersome these days.
Select the local IP address of your Ultra96 and select to forward any TCP requests via HTTP to port 80. Save the new settings and they should take effect immediately (some routers may have to be rebooted before new rules like this will take effect).
Now to sum up exactly what port forwarding is doing in this case, it is taking the local IP address of the Ultra96 and mapping it to my router's external IP address on port 80 using NAT (network address translation). Thus when I want to access my Ultra96 from an external network, I type "<my router's external IP address>:80" into the address bar of a browser.
Explore your router's settings to find what your router's external facing IP address is (the IP address the Internet sees for your router) and you can test the new port forwarding rule:
<your router's external ip address>:80
I used my phone with the Wi-Fi antenna turned off as a final test.
I'm quite excited now to start using and developing on my Ultra96 remotely (particularly for subway train tracking for timing my walk to the platform when heading home).
Keep security in mind while using this since you are exposing your Ultra96 to external networks. Take care to make sure it doesn't have access to sensitive information on your local network and consider setting up a password for its webserver access.
Comments