Skip navigation.

Posts tagged with "no-ip"

SERVER : Dynamic DNS

, , , ...

If you're using a connection that gives dynamic IPs (like for example if you connect to the net over PPPoe) you'll need a way to have a static name for your server even if it has to reconnect to the net and change its IP.

There are a lot of free DNS services, I've chosen No-IP but you can use any other service (like : DynDNS, ZoneEdit).
I've chosen No-IP because a friend showed me how to use it.

For a greater list of Free Dynamic DNS providers look at :
http://www.thefreecountry.com/webmaster/freedns.shtml
or Goole Director -> Dynamic DNS Services

Anyways, back to No-IP.

First thing is you'll have to create a new account with them (it's free so don't worry about it).
Go to their site and press Sign-Up Now and enter in all the information.

Make shore you use a correct email address as that's going to be your username used to modify your settings.
After you've registered and confirmed your registration, you'll have to log into your account and add a new Host/Redirect, for that, go to Hosts/Redirects and Add, and fill in your information
In Hostname enter the name you want to use for your computer, and from the combobox choose the domain you want to use, for example if you enter myhost and select no-ip.biz your address will be http://myhost.no-ip.biz.
In the Host Type you have to select the option you want to use, generally you should use DNS Host(A), for more information about what each type is, click on the question mark, it will open a popup with the information.
You shouldn't worry too much about the IP as we're going to install the program that will auto update that IP for us.
Now press Create Host

Now we have to download the client and install it on our server. For that, go to Downloads and click on the nice penguin (for Linux) and download the file to your server (or download it somewhere else and then transfer it to the server).

Now go to the folder where you've copied or downloaded the file, and execute this :
tar -xzvf noip-duc-linux.tar.gz
you should get a nice output similar to this :
noip-2.1.3/
noip-2.1.3/binaries/
noip-2.1.3/binaries/noip2-Linux
noip-2.1.3/COPYING
noip-2.1.3/debian.noip2.sh
noip-2.1.3/gentoo.noip2.sh
noip-2.1.3/LEEME.PRIMERO
noip-2.1.3/LISEZMOI.ENPREMIER
noip-2.1.3/mac.osx.startup
noip-2.1.3/Makefile
noip-2.1.3/noip2.c
noip-2.1.3/README.FIRST
noip-2.1.3/README.FIRST-SWE
noip-2.1.3/README.FIRST.FRANCAIS
noip-2.1.3/README.FIRST.ITALIANO
noip-2.1.3/README.FIRST.JAPANESE
noip-2.1.3/README.FIRST.pt_BR
noip-2.1.3/redhat.noip.sh
noip-2.1.3/suse.noip2.sh

To copy the no-ip program, execute this :
sudo cp noip-2.1.3/binaries/noip2-Linux /usr/local/bin/noip2
, of course the folder name might be different if you're using a different version of the client. The command will copy the noip executable and name it noip2. Now we need to create the config for NoIp2. It uses a nonstandard folder for the config file (at least the folder doesn't exist by default on Ubuntu), so first we need to create that folder, so execute this :
sudo mkdir /usr/local/etc
.
Now execute
noip2 -C
and follow the onscreen instructions, for me it was like this:
Auto configuration for Linux client of no-ip.com.

Multiple network devices have been detected.

Please select the Internet interface from this list.

By typing the number associated with it.
0       eth0
1       eth1
2       ppp0
press 2 (I use PPPoe for Internet connection), then
Please enter the login/email string for no-ip.com
here you have to enter the email address you've used to register at noip, and enter the password
Please enter the password for user '**********@*******'

If you registered multiple hosts, it will ask you
2 hosts are registered to this account.
Do you wish to have them all updated?[N] (y/N)
of course you should press y to update all of them. If you registered just 1 host, it will skip this question.
Now it will ask
Do you wish to run something at successful update?[N] (y/N)
you should press n unless you really want to execute something after update.
If everything went well, you'll get this answer :
New configuration file '/usr/local/etc/no-ip2.conf' created.


Now we only need to execute
noip2
and in a few seconds our selected domains will be forwarded to our own server.

Now there's just one little catch, if you restart the server, the noip2 program won't run automatically, so we need to ad it to /etc/rc.local which is executed each time the computer boots. Just run this command :
sudo editor /etc/rc.local
and modify the file to look like this :
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# start No-Ip si that our server is accessible with myname.no_ip_domain
noip2

# don't remove the next line, or the server fill give some errors
exit 0
December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31