Hello, I want to have a dummy (internal) root NS to resolve specific name hello.test.com to 4.5.6.7, everything else to 1.2.3.4.
Using a wildcard does not work as expected (by me), though. 1st attempt: # cat db.root $TTL 86400 @ IN SOA ns1.root.internal. dnsadmin.root.internal. 1 21600 3600 604800 600 IN NS ns1.root.internal. * IN A 1.2.3.4 hello.test.com. IN A 4.5.6.7 # dig +short @localhost hello.test.com 4.5.6.7 # dig +short @localhost hello.test.net 1.2.3.4 # dig +short @localhost other.test.com # dig +short @localhost other.test-it.com # dig +short @localhost other.test.org 1.2.3.4 # dig +short @localhost other.test.net 1.2.3.4 Result: returns NXDOMAIN for anything ending in .com - probably because of hello.test.com! 2nd attempt: # cat db.root $TTL 86400 @ IN SOA ns1.root.internal. dnsadmin.root.internal. 1 21600 3600 604800 600 IN NS ns1.root.internal. * IN A 1.2.3.4 *.com. IN A 1.2.3.4 hello.test.com. IN A 4.5.6.7 # dig +short @localhost hello.test.com 4.5.6.7 # dig +short @localhost hello.test.net 1.2.3.4 # dig +short @localhost other.test.com # dig +short @localhost other.com 1.2.3.4 Result: returns NXDOMAIN for anything matching label1.label2.com, works for label1.com however. Again existing entry for hello.test.com seems to override wildcards in an unexcpected way. 3rd attempt: # cat db.root $TTL 86400 @ IN SOA ns1.root.internal. dnsadmin.root.internal. 1 21600 3600 604800 600 IN NS ns1.root.internal. * IN A 1.2.3.4 *.com. IN A 1.2.3.4 *.test.com. IN A 1.2.3.4 hello.test.com. IN A 4.5.6.7 # dig +short @localhost hello.test.com 4.5.6.7 # dig +short @localhost hello.test.net 1.2.3.4 # dig +short @localhost other.test.com 1.2.3.4 # dig +short @localhost other.test-it.com 1.2.3.4 # dig +short @localhost other.test.org 1.2.3.4 # dig +short @localhost other.test.net 1.2.3.4 Result: finally what I wanted Any idea why the wildcard matching is affected by the individual levels/labels of hello.test.com? If multiple enties exist in addition to the wildcard the strange behaviour applies to them as well, e.g. I need: # cat db.root $TTL 86400 @ IN SOA ns1.root.internal. dnsadmin.root.internal. 1 21600 3600 604800 600 IN NS ns1.root.internal. * IN A 1.2.3.4 *.com. IN A 1.2.3.4 *.test.com. IN A 1.2.3.4 hello.test.com. IN A 4.5.6.7 *.bar. IN A 1.2.3.4 *.foo.bar. IN A 1.2.3.4 hello.foo.bar. IN A 8.9.10.11 to resolve specific names hello.test.com and hello.foo.bar to their respective IPs and everything else to 1.2.3.4. (DNS-Server version happens to be BIND 9.7.4-P1) Regards Tom
_______________________________________________ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users