I’m using vyos as a router, firewall, DHCP and DNS server on a segregated homelab subnet.
Forward lookups for the network are functioning perfeclty, but I’ve been unable to get PTR records to resolve. I’m clearly not understanding the expected syntax when creating a PTR record. I’ve tried several iterations, including:
Regardless of what I do, the record never comes back when performing an nslookup/dig. I’ve tried specifying the FQDN, and just specifying the target hostname. No luck.
Plz halp, what am I getting wrong here?
vyos@router# show service dns forwarding authoritative-domain mylab.local
records {
…
ptr 5.0.0.10 {
target test.mylab.local
}
ptr 5.0.0.10.in-addr.arpa {
target test.mylab.local
}
ptr 10.0.0.5 {
target test.mylab.local
}
ptr 10.0.0.5.in-addr.arpa {
target test.mylab.local
}
}
The TLD is in-addr.arpa for IPv4 and ip6.arpa for IPv6.
The IP will be written in reverse (so IPv4 A.B.C.D is in reverse for PTR records written as D.C.B.A.in-addr.arpa).
The record type is PTR.
And when typing the hostname you want this IP to resolve into dont forget that dot at the end.
So if you want your IP to reverse resolve into “host.example.com” when you type the PTR record in the zone it should be written as “PTR host.example.com.”