[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fun DNS Question



KoReE said:
> I'm wanting to do reverse DNS for subnets (smaller than a /24).

There's an RFC on CIDR in-addr.arpa delegation apparently, but the way
we do it is like this:

Say, for example, that you own 192.168.0.0/24.  You have a zone file
db.0.168.192.in-addr.arpa that looks something like this:

    @	IN	SOA	ns.example.com.	root.example.com. (
			1	; serial
			10800	; refresh (3 hours)
                        3600	; retry (1 hour)
                        604800	; expire (7 days)
                        86400 )	; minimum (1 day)
        IN      NS      ns.example.com.

Now, let's say you want to delegate 0-3 (192.168.0.0/30) to me.  You'd
add something like this:

    0	IN	NS	ns1.lanscape.net.
    1	IN	NS	ns1.lanscape.net.
    2	IN	NS	ns1.lanscape.net.
    3	IN	NS	ns1.lanscape.net.

Then, on my nameserver, I'd have a db.0.168.192.in-addr.arpa that
looks something like this:

    @	IN	SOA	ns.example.com.	root.example.com. (
			1	; serial
			10800	; refresh (3 hours)
                        3600	; retry (1 hour)
                        604800	; expire (7 days)
                        86400 )	; minimum (1 day)
    0	IN	PTR	network.lanscape.net.
    1	IN	PTR	host1.lanscape.net.
    2	IN	PTR	host2.lanscape.net.
    3	IN	PTR	broadcast.lanscape.net.
    4	IN	NS	ns.example.com.
    5	IN	NS	ns.example.com.
    [... You get the idea ...]
    255	IN	NS	ns.example.com.

You can also do individual zones for each of the IP addresses.  Either
way seems to work OK.

> I realize
> that DNS was not made to do this, but I've heard some talk about a trick
> to do this using some kind of CNAME trickery.

It doesn't work right.  Don't try it.

Steve
-- 
steve@silug.org           | Linux Users of Central Illinois
(618)398-7320             | Meetings the 4th Tuesday of every month
Steven Pritchard          | http://www.luci.org/ for more info
-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.