Serving Web Pages from a Dynamic IP Address

by Carsten Clasohm on 3 Nov 2000

This document describes how to have your own Linux server on the Internet without renting a dedicated machine or a leased line. More technically, it's about setting up a fixed domain name for a dynamic IP address. It's not about firewalls, PPP, Sendmail or Apache.

The Problem

You have a cheap Internet connection at home, which allows you to leave your computer online the whole day. Instead of using one of those free services that offer Webmail, bookmarks, file storage, etc., you want to set up and maintain your own server and access it through the Internet, and perhaps even run your database-backed website on it.

One of the reasons that your connection is so cheap might be that your ISP doesn't want you to stay online 24/7, and only gives you a dynamic IP address (like 64.155.141.227). Apart from being hard to remember, this address changes every time you re-connect to the Internet.

The Solution

To associate a domain name with the numeric address you get each time you dial in, you need a dynamic DNS service. To accelerate domain lookups, nameservers cache the data they have received from their peers for some hours. The dynamic DNS servers use a very low timeout, so that their data is only cached for a few minutes by other servers. Of course this means that those dynamic servers have to cope with a higher traffic load, and that lookups of such addresses take a little longer.

There are a couple of free and commercial services out there, and also some comparision lists. You should start with a free service, and switch to a commercial one like TZO.com when you need something more reliable.

If you have a couple of servers, your own domain name, and are worried about the speed of the dynamic nameservers, you might want to use a service like easyDNS, which allows you to manage a normal nameserver for your domain via a nice Web interface. By setting up aliases, you can still use dynamic IP addresses for certain hosts. E.g. let home.joe.com point to joe.tzo.com, and you'll never need to type tzo.com again (works for www, too).

Under the Hood

Each time you dial in, you have to inform the dynamic DNS server of your new IP address. Most times, this is done by requesting a special URL from a Perl or shell script, which is invoked from /etc/ppp/ip-up, which in turn is executed by the PPP daemon that connects your Linux machine to the Internet. More information about this should be available on the DNS service's website.

Before hooking up your computer to the Net for a longer time, be sure to learn how to set up a firewall, disable Internet daemons that you don't need, and don't forget that your ISP may not be too happy with you hogging the line 24 hours a day. Apart from that, enjoy the freedom of accessing your computer from (almost) everywhere in the world.

Comments

dynamic ip

hi, ich suche infos zum betrieb eines eigenen webservers. dabei bin ich auf deine seite gestossen. ich arbeite an einem suchmaschinenprojekt ajondo. dabei würde mir ein eigener server helfen. ich hab dsl und nen alten pc. ich weiss wo ich apache downloaden kann etc. aber so richtig hab ich's noch nicht kappiert. gibt es weitere infos auf deiner seite zu diesem thema? läuft deine seite auch über dsl? beste grüße

by Mike Wood, 23 Nov 2004

Re: dynamic ip

Hi Mark,

diese Website laeuft schon seit laengerer Zeit nicht mehr ueber DSL. 128 oder 256 kbps Upstream Bandbreite sind dafuer einfach zu langsam. Wenn es ein einfacher Server mit Linux, Apache, MySQL und PHP sein soll, gibt's genuegend Hosting Provider zur Auswahl. Fuer technisch anspruchsvollere Server wie diesen hier sind die Root Server von 1&1 gut. Wenn man sich den Server mit ein paar Leuten teilt, ist auch der Preis akzeptabel.

by Carsten Clasohm, 06 Dec 2004

Add a Comment

Comments are reviewed before they appear on this page.

Title:

Comment:

Text above is