How can a computer with dynamic IP work as a webserver?

How can a computer with dynamic IP work as a WebServer?


I have done this before and the process is pretty straightforward.

I ran a webserver on a dial up account that needed to disconnect and cycle IPs every 12 hours to be in compliance with my ISP Terms Of Service at the time. I will assume in your case you do not need to worry about the logic to keep the thing dialed up, so I will skip right to the next part.

the first thing you need to do is create a resolvable Fuly Qualified Domain Name that is resolvable on the internet. You can do this if you run your own DNS server or you can use a free service like DynDNS to create a static, but resolvable name you will use to get to your webserver.

Once you have selected your domain name and have a valid DNS entry to resolve it then next step is to install the DynDNS update service on your webserver which will update your DNS entry dynamically when your IP changes.

The next step is to build your webserver. I have used both IIS and Apache succesfully in this scenario. Whichever server you use is a matter of personal preference.

After all that is complete, you will need to make sure that your router/firewall is configured to port forward to your webserver inside your network. I recommend forwarding port 80 which will make the site accessible to everyone who types the FQDN into their browser. If you want to keep this server private, you might consider putting the webserver on another port.

enter image description here

DynDNS Services Page


I think you are looking for a dynamic DNS service. There are several ones, here is one example : No-IP

You will have to create an account, then have a software running on your computer which will update your IP on their server.

After, there will be an address like username.no-ip.org, username.myftp.org, etc. which will point to your computer.


Other possibility, if you want to host a small casual site and you want rather something simple to configure, you could use Opera Unite. Directly from Opera, it allows you to host a webserver (or directly a file/photo server), and takes care about the dynamic DNS itself.

Keep in mind though that this is a solution for a rather "volatile" and personal website, which you would like to show to friends, without especially having it online all the time.

The "Unite" service of Opera is still in beta at the moment (though already stable).