Hostnames on an internal subnet that also resolve in public DNS
Sam Trenholme
strenholme.usenet at gmail.com
Wed Feb 11 14:12:16 EST 2009
OK, to clarify, what MaraDNS can't do (but what people have frequently
asked for over the years) is have it so a given host name resolves
differently depending on the IP someone has.
> So maybe my question could be rephrased as follows. Is it possible to
> configure MaraDNS to provide the same functionality of /etc/hosts?
[...]
> 3) even if some of the addresses are on the same domain as those we manage
> with MaraDNS.
Yes, MaraDNS can do this. In particular: It is possible to have
MaraDNS resolve foo.example.com with the authoritative nameserver, but
use recursion to resolve bar.example.com.
This is done something like this:
Make a zone called foo.invalid.example.com or what not.
Then add entries to the zonefile that aren't part of this zone, such
as "foo.example.com" or "www.amazon.com.phisher.nasty.example.net"
For example, this 4-line mararc file will allow on to have IP
addresses in the file named "db.list" similar to /etc/hosts:
ipv4_bind_addresses = "127.0.0.1"
recursive_acl = "127.0.0.1/8"
csv2 = {}
csv2["foo.invalid.example.com."] = "db.list"
The file "db.list" can now look like /etc/hosts (but with the name
before the IP):
foo.example.com. 10.2.3.4
weirdname.local.foo. 10.2.3.5
etc.
If you want a single name to have multiple IP addresses, that's also easy:
foo.example.com. 10.2.3.5
foo.example.com. 10.2.3.4
You can even have non-A records:
foo.example.com. TXT 'Foo!'
More information about the list
mailing list