How to Build Linux Web Server with Dynamic IP Address

Requirements:

  • Ubuntu GNU/Linux
  • Account at freedns.afraid.org
  • Easy Hosting Control Panel (EHCP)
  • Router

How to:

1. Install Ubuntu.

We set local IP Address to 192.168.0.1

$ sudo nano /etc/network/interfaces

Type in the following lines:


auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.254

192.168.0.254 is the gateway / modem’s IP Address.

2. Install EHCP
3. Forward port 80 in your modem / router to redirect to IP Address 192.168.0.1
4. Register account at FreeDNS

freedns.afraid.org

 

 

 

 

 

 

 

 

 

 

 

 

5. Create subdomain at FreeDNS. For example: ubuntuserver.mooo.com. Input destination column with your public IP Address. You can check your public IP Address at http://whatismyip.com

add new subdomain

 

 

 

 

 

 

 

6. Create cronjob to update DNS  every 5 minutes

$ sudo crontab -e

*/5  * * * * lynx -dump http://freedns.afraid.org/dynamic/update.php?VG5LbWRxMzFVJDKGVdCd2hiNDo2NDgwMTQx > /dev/null 2>&1

The value VG5LbWRxMzFVJDKGVdCd2hiNDo2NDgwMTQx can be retrieved from http://freedns.afraid.org/dynamic/ in Direct URL link.

7. Done. Check http://ubuntuserver.mooo.com or http://your_public_ip

Keywords:

  • my book live web server
  • freedns afraid linux
Comments
  1. aux Reply
    • kumkum Reply

Leave a Reply

Your email address will not be published. Required fields are marked *