How to Build Linux Web Server with Dynamic IP Address


  • Ubuntu GNU/Linux
  • Account at
  • Easy Hosting Control Panel (EHCP)
  • Router

How to:

1. Install Ubuntu.

We set local IP Address to

$ sudo nano /etc/network/interfaces

Type in the following lines:

auto eth0
iface eth0 inet static
gateway is the gateway / modem’s IP Address.

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













5. Create subdomain at FreeDNS. For example: Input destination column with your public IP Address. You can check your public IP Address at

add new subdomain








6. Create cronjob to update DNS  every 5 minutes

$ sudo crontab -e

*/5  * * * * lynx -dump > /dev/null 2>&1

The value VG5LbWRxMzFVJDKGVdCd2hiNDo2NDgwMTQx can be retrieved from in Direct URL link.

7. Done. Check or http://your_public_ip

4 thoughts on “How to Build Linux Web Server with Dynamic IP Address

  1. This was incredibly informational – THANK YOU.

    im partially confused what the purpose of step 6 is for, but it appears to be working so im happy 🙂

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.