Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 home.sickel.net (well, not exactly, but you get the idea)

Is it possible to set up my internal dns so that it resolvs home.sickel.net as All other hosts on sickel.net 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 home.sickel.net 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 home.sickel.net zone in bind. The details are here: serverfault.com/a/223958 – Matt Feb 15 '13 at 21:30
up vote 9 down vote accepted

Sure you can do it. Take a look here: https://help.ubuntu.com/community/BIND9ServerHowto#Primary_Master_Server_configuration

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

red@ubuntu:/etc/bind$ cat db.sickel.net
$TTL    604800
@       IN      SOA     localhost. root.localhost. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
@       IN      NS      localhost.
home.sickel.net. 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 home.sickel.net @localhost
red@ubuntu:/etc/bind$ dig +short sickel.net @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.