OK Gord, here goes:
Port Forwarding ius the opening up to the outside world, of a port on "your" side, the lan. The Arduino code EthernetServer server(8085);
puts the server (in my case) on port 8085, and that port needs to be made visible; port forwarding does that.
Without forwarding, your server will never be seen from outside. How you do the forwarding, depends on the hardware of the router. Turns out mine, for example, has a menu item when I access the router from the lan side thru a browser. You'll need to check your user docs for that. Or Google port forward and your router model.
My ISP wouldn't let me forward port 80, the default for a server, so I buggered around until 8085 worked. Go to portforward
and download their port checker- it'll tell you if a particular port is accessible from outside, ie has been forwarded properly.
Next, on the static address. You don't have to have a static address. You can use dynamic dns, and there are a number of purveyors of that such as dyn
. What that is is that you get a domain name from them, and that name stays attached to the ever-changing ip address. How does it know it's changed? Two ways:
- First, you download their desktop widget thing to one of your network pcs. That app keeps an eye on the wan ip, and if it changes, like on a router reset, it informs dyn. Within a minute or so of the reset and new ip, the name is matched to the new number
- Second, your router may support dynamic dns. Check the docs again. On mine, there's a config item to let me tell the router about dyn. In fact dyn was in a pre-loaded list in my router config. So now, every time the router changes its ip address, it immediately lets dyn know and my domain name is up to date
EDIT: Just noticed my router docs use the term Virtual Server
for Port Forwarding.