Setting Up Dyndns

For those who have difficulty in remembering the IP address for our acmlin server, I set up a temporary public hostname: acmlin.dyndns.org.

You can use that domain for SSH, FTP, or HTTP access.

Since our acm server is using a dynamic IP address, I also set up a ddclient which remaps the domain to the new IP address whenever the IP address changes.

Here is how to setup Dynamic DNS domain:

    Visit the website: http://www.dyndns.com/?via=logo
    Go down to the free domain box and enter your custom name and click add
    Create a new account
    Activate your account via email
    To map your new hostname to your host’s IP address, go to My Account>My Hosts>Click on your hostname and enter your ip address and save.

To set up the ddclient:

Obtain the ddclient program using wget http://cdn.dyndns.com/ddclient.tar.gz
Extract the program using tar xvzf ddclient.tar.gz
The newly extracted folder is called ddclient-3.7.3/
First copy the ddclient program to the /usr/sbin/ directory using cp ddclient-3.7.3/ddclient /usr/sbin/
Create /etc/ddclient using mkdir /etc/ddclient
Create a ddclient.conf inside /etc/ddclient/ and paste the following information (NOTE: the following configuration file is for acmlin only):

######################################################################

##

## $Id: sample-etc_ddclient.conf 8 2006-06-14 19:51:39Z wimpunk $

##

## Define default global variables with lines like:

## var=value [, var=value]*

## These values will be used for each following host unless overridden

## with a local variable definition.

##

## Define local variables for one or more hosts with:

## var=value [, var=value]* host.and.domain[,host2.and.domain...]

##

## Lines can be continued on the following line by ending the line

## with a \

##

##

## Warning: not all supported routers or dynamic DNS services

## are mentioned here.

##

######################################################################

daemon=300 # check every 300 seconds

syslog=yes # log update msgs to syslog

mail=root # mail all msgs to root

mail-failure=root # mail failed update msgs to root

pid=/var/run/ddclient.pid # record PID in file.

ssl=yes # use ssl-support. Works with

use=web, web=checkip.dyndns.com/, web-skip=’IP Address’

login=mylogin

password=mypassword

protocol=dyndns2

server=members.dyndns.org

wildcard=YES

acmlin.dyndns.org

7. Replace the login and password values with your username and password that you created from dyndns.com:

login=please see the ddclient.conf inside acmlin:/etc/ddclient/ for the username.

password=please see the ddclient.conf inside acmlin:/etc/ddclient/ for the password.

NOTE: Only root can read the file.

8. Next move the ddclient start-up script to /etc/init.d/ using cp sample-etc_rc.d_init.d_ddclient.ubuntu /etc/init.d/ddclient

9. Configure ubuntu to allow the ddclient script to start at boot and stop at shutdown using update-rc.d ddclient defaults

10. Next create a ddclient folder in /var/cache using mkdir /var/cache/ddclient

11. Now go ahead and start the program using /etc/init.d/ddclient start

12. ddclient will log all of its activity in the /var/log/syslog file. You should get the following entry in the syslog file:

May 23 10:57:30 acmlin ddclient[11992]: SUCCESS: updating acmlin.dyndns.org: good: IP address set to 134.139.67.210

If you get a FAILED message, check your /etc/ddclient/ddclient.conf and start again.

WARNING: Do not attempt to update the ddclient more than once per 5 minutes. It is considered an abuse on dyndns’ system and we might get into some trouble. The ddclient is currently running in the background and set to check the IP address ever five minutes.

Security NOTE: ddclient sends the dyndns account information (username and password) to its server via encryption. In order for it to do so, the server must have libio-socket-ssl-perl installed. To install it on Ubuntu:

apt-get build-dep libio-socket-ssl-perl

apt-get install libio-socket-ssl-perl

You can now visit our acm server via HTTP: http://acmlin.dyndns.org/

Advertisement

About safeerror
I'm currently a student at CSULB.

Comments are closed.

Follow

Get every new post delivered to your Inbox.