Give your Mac OS X computer a hostname with DynDNS
This article will show you how to easily setup a free DNS service that will give your Mac computer a static hostname. There are a lot of possibilities you can use this for, as most of the Internet connections offer dynamic IP addresses. Having a dedicated hostname can make it easier to remotely connect to your computer and run any kind of server.
Since its inception in 2001, Dynamic Network Services offers a fantastic service called DynDNS. This is a Domain Name Service (DNS) that you can freely use. The company is quite popular in their line of work, so a number of routers have DynDNS service implemented in their software. I have been using this for a year or so in my Canyon WLAN Router and it works flawlessly.
For those who are still wondering what am I talking about, DynDNS can be used for giving your IP address a good-looking hostname. This is especially useful in situations where you are using dial-up access or ADSL connections with dynamic IP addresses. By using the DynDNS service with a combination of their software installed on your computer, you can be always available through the same host name. You can use this setup when you are hosting a web server on your local computer or when you want to use service like Virtual Network Computer (VNC) to access your desktop from a far away location. In both of these scenarios, you will need a static address, so the DynDNS service comes quite handy.
First you need to visit the DynDNS web site and create an account. One of their policies is that one person cannot create multiple free accounts, so watch out for this. When signing up, you will receive an e-mail requesting you to confirm the registration process.
After this you can log into your account. You will see a lot of options but don't bother with them, on the bottom there is a link saying "Add Host Services". Follow this link and then click on "Add Dynamic DNS Host". Here you will be able to chose your own hostname. There are tens of domains you can use and for the purpose of this article I chose nonstopmac.blogdns.com. The default IP you will se in the settings will be your current IP. In 99% of the times this is the IP to use, as you want hostname to resolve to the computer you are currently using. After setting this up click "Add host" and you are finished with the "first and only time" web setup.

I mentioned that the DynDNS service needs locally installed software. This is because the best way to alert their service that you have a new IP address is by doing it automatically. Manual labor is both boring, time consuming and in some cases inefficient (some ADSL lines are made to change the IP address transparently). The software consists of two parts - a daemon listener and a widget. Of course the daemon is more important, so you will be able to use it on non-Tiger Macs.

The configuration is pretty straightforward: you need to "Add user" by filling in username, password and description fields. Of course you need to use the account credentials you have setup for the DynDNS service. Now the software will snatch your information from the online account. If in any case IP address or a hostname you are using don't pop-up in the list, use "Edit hosts" to manually write in the details (btw, be sure to chose the Dynamic DNS option).
Now, the most important thing is that the IP you are seeing is the right one - you will need to change to the Interface you are using. Depending on the type of your connection there are a couple of options. Chose:
Default Interface
- If you are connected through normal modem, you should chose Default Interface
External Interface
- If you are connected to the Internet via ADSL modem, ADSL router, WLAN ADSL router and similar devices
Bottom line - the IP that will show on activated connection must be your external one - if it starts with something like 192.168.X.X, you can be sure that it is wrong (this subnet is used for local IP addressing).

After setting all of the information, just watch out that your daemon is running (there is a Pause button on the bottom of the File -> Edit Users screen that toggles this option on and off. Also a very important thing is that the "Active" boxes in the "Edit users" screen are checked on!

To test everything works just fine, you can ping the hostname. Pinging it will show the IP the domain currently resolves:
PING nonstopmac.blogdns.com (83.131.3.36) 56(84) bytes of data
Needless to say that the daemon must run in the background to be able to report your new IP address to the DynDNS service. File -> Preferences holds information on the daemon behavior on system boot-up.

Finally I would like to mention the DynDNS widget. It is just an eye-candy application showing the current state of your hostname and IP address. You can also change interfaces from inside this widget.

So this is basically it, if you have followed these instructions everything should work just fine.

Comments
Informative article - looks like DYNDNS will simplify my testing of a couple of file transfer protocol servers.
Posted by: Charlie | December 1, 2005 10:30 PM
There's also www.No-IP.com
Posted by: Serge Lafont | December 2, 2005 03:09 AM
You can also visit http://www.dnsexit.com
You can use your own domain name for dynamic DNS for free with their service.
Posted by: Todd Crames | December 2, 2005 06:54 PM
If you have multiple computers connected to your router then your router could be handing out a different IP address to your computer each time you re-establish network connectivity. Therefore, if you're running something like an FTP server, which requires you to port-forward (example: port 21) on your router to the appropriate internal IP then you need to make sure the computer your FTP server is on is not set to dynamically allocate an IP. If it is, and if, for some reason your computer with dyndns gets a different IP from the router, then you will no longer be able to connect to your ftp server using the dyndns address because your router will be forwarding port 21 to some other IP.
Posted by: Ansh | December 2, 2005 07:43 PM
I looked @ the dnsexit.com site because I wanted to use my existing url name, but they don't have a mac client - is there one that is compatible?
Posted by: rick | December 2, 2005 09:26 PM
something i tried and like: if you own a domain name and have access to the dns settings: set up a subdomain like dyn.yourdomain.com as a CNAME entry and point it to your dyndns address.
Posted by: mark | December 3, 2005 12:30 PM
You can also do this if you are using the newer(ish) Linksys/Cisco routers. It is built into the router.
Jon
Posted by: Jon | December 3, 2005 07:43 PM
Netgear routers also has this auto-responder facility..
Posted by: SoGood | December 4, 2005 11:56 PM
Thanks for the write up! Glad you find the service useful.
--
Jeremy Hitchcock
DynDNS
Posted by: Jeremy Hitchcock | December 5, 2005 04:49 PM
You say "Of course the daemon is more important, so you will be able to use it on non-Tiger Macs". Meaning what? Their software does not work on Tiger?
Posted by: Sean | December 5, 2005 05:38 PM
http://www.everydns.net/ is anohter free one if you own your own domain name. No fancy gui client (use perl and cron), but you have pretty much full access to make DNS records. Good site for the advanced user.
Posted by: allan | December 5, 2005 05:59 PM
Sean, if you read the entire paragraph you'll see that Berislav is talking about the widget AND the daemon. Since non-Tiger Macs don't have Dashboard they can't use Dashboard widgets. The daemon works on all versions.
Posted by: Mirko | December 5, 2005 09:02 PM
>I looked @ the dnsexit.com site >because I wanted to use my existing >url name, but they don't have a mac >client - is there one that is >compatible?
You can use a special link that updates your ip so you don't need a client at all.
Posted by: Anirog | December 9, 2005 07:41 PM
it wiil be us to help some school in Ghana
Posted by: jamse | August 16, 2006 01:46 PM
I did everything as described, got back all the right feedback too...
but...
I cannot use my swanky new hostname with Chicken of the VNC on Mac OS X 10.4.8 It cannot connect. Yet, the IP address itself can do so fine.
The daemon is running, boxes are checked off, widget confirmed all is a go...
The mac is on dsl with a linksys router in between. I have "external interface" checked off on that mac.
Any chance someone can give me some clues?
Posted by: yisroel | November 6, 2006 07:10 PM
Seems that http://www.everydns.net/ and http://www.dnsexit.com works only if you use their dns in your configuration and one of them only if you register the domain with them.
Posted by: Anonymous | January 25, 2007 10:16 AM
You know I have been plugging away for a week and a half all over the net looking for some straight forward info on how to serve up a simple website from my 10.4.9 Mac. It is on a router that has no software available (linksys). I'm not a web guru. As I look around the Mac, I see a half a dozen numbers related to the internet, network etc etc. It is super easy to serve up the page on the network - but I can not get it to fly on the internet, for someone not connected to my network. Of course all the terminology has me stumped also.
With that, can anyone just give me a simple tutorial that a layman can understand.
example:
step one: router without additional software/ inside osx 10.4 forwarding (forwarding?)
step two: the right ip address and where to put it, uh yeah (which one)
step three: home sites folder vs Apachie documents folder
step four: "gateway" ? IPv6 number ?
get my drift - HELP!!!!!
will greatly appreciated
Posted by: Jim | May 10, 2007 02:41 AM