Setting up reverse DNS for your subdomains


You've got a domain setup in DNS (using Freesco) to resolve to a machine on your LAN, as explained here. Now, you can visit your website from the local network, but you want to be able to lookup a machine's name based on its IP address.


You need to configure Freesco's DNS server for reverse DNS lookups. The DNS configuration is stored in one of three files, depending on your local addressing scheme.

If your LAN uses this block of addressesThen use this configuration file

Brief version:

Login as root, edit the file named above, and add one entry per subdomain in the format:


A couple of notes: y.x refers to the last two octets of your IP address in reverse order (eg: for, you'd use 76.42). subdomain is your subdomain, and .DOMAIN. is literal text - don't alter it.

Copy your reverse DNS file to /etc, restart your nameserver with /mnt/router/rc/rc_named restart, and you're done.

Longer walkthrough for newbies:

Connect to your Freesco box via telnet (under Windows, just type telnet <your router's ip>) and login as root.


cd /mnt/router/etc
edit named192.rev
NOTE: You need to replace named192.rev above with the appropriate filename, as explained in the table at the top of this page.

Now, you need to enter any subdomains that you want to setup. For our example, we wanted to resolve to, to resolve to, and to resolve to, so we entered:

This is a bit tricky. The first item on each line is the LAST TWO octets of your IP address, in reverse order (eg: if your address was, you'd use 92.47). If you're using 10.x.x.x addresses, it's the last THREE octets in reverse order.

IN and PTR have special meaning - don't change or omit them. Next is the subdomain you want to setup, followed by a period, followed by the word DOMAIN, followed by another period. Don't forget the final <TAB> at the end of each line.

And note that where we say <TAB>, we mean that you should press the TAB key.

Next, press Alt+X to exit, and when the editor asks you to save, press Y to confirm.

Finally, you should restart your nameserver. Type:

cp /mnt/router/etc/named*.rev /etc
/mnt/router/rc/rc_named restart
At this point, you should be able to type nslookup on one of your Windows boxes (or host under Linux), and it should return the correct IP address for that domain.

Note that your default domain (or "primary DNS suffix") on all of the machines on your network should be, as well. On Windows XP, for example, you can change your primary DNS suffix under Start|Control Panel|System|Computer Name|Change|More....