Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I am running a bind9 dns server at my home network, serving for all my internal servers in my domain local / 192.168.x.x - one of those, extweb.local is also visible from the internet as (well, not exactly, but you get the idea)

Is it possible to set up my internal dns so that it resolvs as All other hosts on are run externally and should not be resolved by my internal dns.

(All this mainly to make things easier for the rest of the family, so that they always can refer to the server as no matter if they are at home or accessing it through the www)

All the servers on my home network runs debian. They are all in the same subnet, connected through a single gateway to the internet.

share|improve this question
You will need to describe the setup in more detail if you want valid responses. What is the layout? E.g., DSL router, home.sickel.example and the other machines at home all hang of it? What OS is home running? It would be easy enough to set-up bind in such a way that home handles all DNS queries, and passes anything OTHER than homes IPs off to your ISP DNS servers (slave set-up). – tink Feb 15 '13 at 20:53
You need to override the lookups with a zone in bind. The details are here: – Matt Feb 15 '13 at 21:30

1 Answer 1

up vote 9 down vote accepted

Sure you can do it. Take a look here:

red@ubuntu:/etc/bind$ cat named.conf.local
zone "" {
             type master;
             file "/etc/bind/";

red@ubuntu:/etc/bind$ cat
$TTL    604800
@       IN      SOA     localhost. root.localhost. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
@       IN      NS      localhost. IN     A
red@ubuntu:/etc/bind$ sudo service bind9 restart
 * Stopping domain name service... bind9 [ OK ]
 * Starting domain name service... bind9 [ OK ]
red@ubuntu:/etc/bind$ dig +short @localhost
red@ubuntu:/etc/bind$ dig +short @localhost

Now just change your /etc/resolv.conf to use as the primary nameserver.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.