Hardware Reference
In-Depth Information
Making a Private IP Device Visible to the Internet
Up until now, the Internet-related projects in this topic
either worked only on a local subnet, or have only sent data
outbound and waited for a reply. This is the first project
in which your device needs to be visible to the Internet at
large. You can view it while you're on the same local network,
but if it's connected to your home router and has a private
IP address, it won't be visible to anyone outside your home.
To get around this, you need to arrange for one of your
router's ports to forward incoming messages and connec-
tion requests to your Ethernet shield.
you set. Note that the router reserves some ports for special
purposes. For example, you may not be able to port forward
port 80, because the router uses it for its own interface.
That's why you might need to use a high number, like 8080.
Web browsers default to making their requests on port 80,
but you can make a request on any port by adding the port
number at the end of the server, address like so:
http://www.myserver.com:8080/
To do this, open your router's administrator interface and
look for controls for “port forwarding” or “port mapping.”
The interface will vary depending on the make and model
of your router, but the settings generally go by one of these
names. It's easiest if the forwarded port on the router is
the same as the open port on the Ethernet module, so
configure it so that port 80 on your router connects to port
80 on the Ethernet shield (if your router allows it). Once
you've done this, any incoming requests to connect to your
router's public IP address on that port will be forwarded to
the Ethernet module's private IP address on the port that
The new public address of your Ethernet module will follow
this pattern, too. For example, if your home router's public
address is 203.48.192.56 , you'd access your new Arduino
server at http://203.48.192.56:8080 .
Figures 4-6 and 4-7 show the settings on an Apple AirPort
Express router and a Linksys wireless router. On the Linksys
router, you can find port forwarding under the Advanced tab.
Figure 4-6
Port mapping tab on an Apple AirPort Express router. Port mapping
can be found under the Advanced tab.
Figure 4-7
Port forwarding on a Linksys wireless router.
Search WWH ::




Custom Search