Hardware Reference
In-Depth Information
There's absolutely nothing wrong with these goals, as long as you understand that
there are certain risks associated with inviting outside traffic inside your home
network. As we speak, there are thousands of automated attacks running wild on the
Internet, scanning for badly configured services and vulnerable software to exploit
for fun and profit.
If a malicious human or application manages to compromise your Pi, the best case
scenario is that you notice it and re-image your SD card. One of many possible worst
case scenarios is that your relatives' credit card number gets stolen from another
computer attached to your network and your Pi starts sending out millions of spam
e-mails while you scratch your head wondering why your Internet connection feels
so sluggish lately.
With that grim disclaimer out of the way, let's see what we can do to minimize the
risks and keep uninvited guests at bay.
Dynamic DNS
Let's say that you are over at your friend's house and you'd very much like to log
in to your Pi through SSH to show your friend all the neat experiments you've been
working on.
You know that your Pi is up and running at your house. You even remember the IP
address is 192.168.1.20 . So why can't you seem to connect with PuTTY from your
friend's computer?
Well, there are multiple obstacles to overcome here. First of all, 192.168.1.20 is
from a private address range and has no meaning outside of your home network.
These are the three private address ranges:
10.0.0.0 to 10.255.255.255 (Class A network)
172.16.0.0 to 172.31.255.255 (Class B network)
192.168.0.0 to 192.168.255.255 (Class C network)
You need to find out what the external IP (also called WAN IP or Internet IP) of your
home network is. You can usually find out by logging in to your home router, but it's
easy to use one of the many free services available on the Internet. For example, visit
http://ipogre.com or use the following command on the Pi:
pi@raspberrypi ~ $ curl ipogre.com
So now you know your external IP. Here's the next obstacle: the external IP address
usually changes once in a while. Unless you pay extra for a static IP address, your
Internet Service Provider usually gives you a dynamic IP address that changes.
 
Search WWH ::




Custom Search