Setting up reverse DNS for your subdomains (v027)


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 addresses use this configuration file
192.168.*.* /mnt/router/etc/named192.rev
172.16.* /mnt/router/etc/named172.rev
10.*.*.* /mnt/router/etc/named10.rev

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 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. The FREESCO editor shows TAB characters as a bold capital *I*

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
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….

made by Steve Blinch

freesco/howtos/setting_up_reverse_dns_for_your_subdomains.txt (176179 views) · Last modified: 2005/09/14 00:49 (external edit)
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki