problem to resolve fqdn (bind9, dnsmasq) in a local non public network

hello virtualmin users

I have two debian-squeeze-servers behind a router (asus wl-500gp v2, dd-wrt vpn) using nat.
both servers shouldn’t be public!
but they should be accessible from the local private network and by openvpn.

in the local network I use dnsmasq (router) in order to manage all pc’s concerning ip’s, hostnames (fqdn) and nameservers (router as nameserver).

before the virtualmin install (using,
when I test the local network, I can reach all pc’s using fqdn.
even when I conncect to the local network using opnvpn everyting is fine.

but after the installation of virtualmin, resolving fqdn doesn’t work any more.
nslookup returns an error message:
** server can’t find NXDOMAINnan

the resolv.conf entries:
nameserver 192.168.x.1 (asus router)

further in webmin I added 192.168.x.1 as a further nameserver.

I think there must something wrong or missing in my bind9 configuration.
but why does bind9 not forward requests to the nameserver 192.168.x.1 (dnsmasq)?

I have in mind that bind should only resolve fqdn on his ‘own’ host (virtual apache servers).
so that a pc asks for the website and dnsmasq dosen’t know this fqdn dind9 gives the answer. (the very same for openvpn (router as vpn server))

how do I have to configure bind9 (or perhaps dnsmasq) to reach my goal?

any help/hint will be appreciated!!

kind regards, go4vmin

You probably need to configure a forwarder in BIND… It does not know about your router by default, you need to tell it about it.

Without a forwarder, BIND will do a recursive lookup, starting at the DNS root servers. But those probably do not know about your private domains.

Check Webmin -> Servers -> BIND DNS Server -> Forwarding and Transfers : “Servers to forward queries to”.

Hello Locutus

Thanks a lot for your hint. Adding the routers ip (dnsmasq) solved my problem!
So I’m happy now :slight_smile:

Kind regards, go4vmin