Thursday 5 July 2012

Static IP with No-IP


One minor problem that I've experienced with my new server set-up is random changes in my IP address. Ordinarily, I would expect my IP address to stay fixed for as long as my router remained up and connected to the WAN, but short interruptions at the exchange have renewed my IP address on several occasions meaning that I couldn't connect to my network using NoMachine. My new ISP doesn't offer static IP addresses to domestic customers (no surprise there), but I have found a way to achieve the same result using a dynamic IP address.

No-IP is a service that uses a client to update and redirect service to map a static (DNS) or dynamic (DDNS) IP address to an easy to remember subdomain. The good news is that, when my exchange renews my IP address, I don't need to worry any more, I just point No-Machine to my server's new subdomain. Even better, the entry level service is free! The bad news is that the installation instructions for Ubuntu 12.04 out there on the Internet are not as accurate as they could be and I found installation a little tricky. So, here's how I did it!

Firstly you have to sign up for your No-IP account and set-up your host in the Account section - you'll need to know your current IP address for this. The process for setting up your host is pretty straightforward, so I won't replicate it here.

Next is to install the client on your server: don't bother with the sudo apt-get install option to download the No-IP client (suggested on the No-IP site), it doesn't work! Go to the downloads page, click on the penguin and save the file to the location of choice (mine was home/jogga/Downloads/). When the client has downloaded, use Nautilus to navigate to the download directory, right-click the noip-duc-linux.tar.gz file, and select the Open With Archive Manager option. Click Extract.

Now open a terminal and change directory to your extracted file:

cd /home/jogga/Downloads/noip-2.1.9-1

Tip: keep an eye on your folder/version number - mine is 2.1.9-1; yours could be different.

Now issue the make command.

sudo make

Now issue the make install command.

sudo make install

You'll be prompted for your login details and password. Leave the update interval to 30 (unless you have a good reason to change it) and check that the correct nic is selected (probably eth0).

To check that the client is running:

/usr/local/bin/noip2 -S

If not:

/usr/local/bin/noip2

That's it!

Sources & References:

No comments:

Post a Comment