If you’re planning on setting up your raspberry pi as a server or a project that’ll want you to access it from a static external IP address, here’s a really simple and quick way to get that up and running for free.
First off, this guide uses the free service from no-ip (www.no-ip.com), so you’ll want to head over there and register for that. (http://www.no-ip.com/newUser.php)
Done? Ok, great. Next you’ll want to create a new host, this can be found under the “Hosts/Redirects” page (this link should work if you’re logged in: https://www.no-ip.com/members/dns/)
Click “Add a Host”
Enter a name and choose one of the free domains from the drop down box (alternatively you are able to use an existing domain name or sub-domain if you have one.) There are some other settings, if you know what you’re doing go ahead and choose which you prefer but from those who just want to get this set up you can now click “Create Host” and you’re done.
Now, in order for this system to know what your pi’s current address is in order to assign it that domain address you need to install the client on the pi (thankfully, they have a Linux one!).
Download the latest version of their client – http://www.no-ip.com/downloads.php?page=linux
tar -zxvf noip-duc-linux.tar.gz make sudo make install
One there, you’ll be promted for your email and password for no-ip.com.
It will then show you have a host registered, just hit enter.
Then it will ask to update the host you made on the site “Do you wish to have host [somedescriptivename.no-ip.org] updated?[N] (y/N)”. Type “Y” then hit enter.
It’ll ask for an update interval, this can be left at 30.
Then it’ll ask if you want to “run something on successful update”, basically this allows a script to run if it gets a connection. Choose N and hit return.
That’s it, you should be done. Just test out the connection via SSH or ping and compare the IPs.