Last Updated on April 17, 2017 by Dave Farquhar
I run this Web site without a static IP address. I registered an address at DynDNS.org which, as long as I keep it updated, keeps me on the ‘Net.
In the past I’ve used a Windows-based program to keep my address updated. But the hard drive in that Windows box took leave of its life a few days ago. Somehow my IP address didn’t change for a few days, but then my DSL modem fell off the ‘Net.
Then I found setup instructions for Debian and Dyndns, which solved that problem. There’s a Dyndns client in Debian now, which this document explains, so now my Web server can keep itself online without any help from a Windows box and without me writing any nasty code.
Now, I haven’t tested this theory, but I suspect one could use DynDNS plus DHCP or PPPoE to run a Web site with a registered domain name without paying the extra monthly fee for a static IP address. The trick would be to set up your registered name’s DNS record as a CNAME to your DynDNS name.
Setting up the DNS records is left as an exercise to the reader, mostly because my understanding of it is good enough for me to do it myself, but not to explain it–when I’ve tried in the past, all I’ve succeeded in doing was confusing both of us.
David Farquhar is a computer security professional, entrepreneur, and author. He started his career as a part-time computer technician in 1994, worked his way up to system administrator by 1997, and has specialized in vulnerability management since 2013. He invests in real estate on the side and his hobbies include O gauge trains, baseball cards, and retro computers and video games. A University of Missouri graduate, he holds CISSP and Security+ certifications. He lives in St. Louis with his family.
2 thoughts on “Running a Web site without static IP with Linux and DynDNS”
Provided your isp doesn’t block certain ports (ie port 80), which yours obviously doesn’t, then yes you can have your own domain name linked to your dynamic ip address.
If you’re going to run email off of it though, then it may be a good idea to have somebody else as a secondary name server and mail server – and be a backup for them.
There are ways to get around your port 80 issues. I “lead” (I prefer facilitate) a small cell group called “Linux for Lutherans”. I host the web site from my basement (gotta love debian on an old pentium). I have a cable modem and recently my provider closed off port 80. There is free domain service from http://www.mydomain.com.
What I’ve done is set apache to port 8080. Set up a cname for the web.linuxforlutherans.org to linuxforlutherans.dyndns.org, which I’ve pointed at my basement box. Then set mydomain.com to redirect traffic from http://www.linuxforlutherans.org to http://web.linuxforlutherans.org:8080/
I use mydomain.com to forward email to another account and voila, I’m in business.
Comments are closed.