-   Linux - Networking (
-   -   Setting up a DNS server for hosts both on the Internet and on a private network (

jjthomas 03-08-2011 11:17 PM

Setting up a DNS server for hosts both on the Internet and on a private network
I have the domain I have a web server and mail server being hosted out on the Internet. and The domain is registered and I am using my registar's name servers. Everything is working fine.

In my house I also have the domain name I have the computers named,, I also have several virtual machines running on my home network.

In the past I have just updated hosts files as needed. But it is getting too hard to keep all the hosts files in sync. I am looking for a central host file. I am trying to learn DNS and Bind. I am running Slackware 13.1 on an old P3.

I understand the caching DNS server and it works fine. I'm somewhat comfortable with setting up a DNS server, but I am confused as how do I setup a server for looking up my home network address and resolve those, and at the same time look up like and resolve it.

I am not wanting to setup a DNS server for Internet access, my ISP seems to have that covered. I can set up forwarding to my ISP's servers to lookup Internet addresses. But how do I configure Bind not to look up addresses for my internal hosts? Can I give it a list of all my internal host names to search through first?


KinnowGrower 03-08-2011 11:47 PM

I have same kind of setup for my home network

On every host/computer, file /etc/resolv.conf have the first line point to your local nameserver (must be your local DNS) e.g.

nameserver IP_for_your_local_DNS server (to resolve names for your internal hosts)
nameserver IP for_your_service provider DNS server (to access Internet)

How to setup your own DNS and DHCP server. Please read the post on my blog

I hope it will help

All times are GMT -5. The time now is 09:21 AM.