Server Fault is a question and answer site for system and network administrators. 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 have a debian server (gateway, web) which is behind ISP's NAT. I need access on webserver from my local network but domain has DNS record for external IP. Can I create "fake dns" for my local network with local server ip? I have bind9 on my server but I don't know what to do next... Can someone help me? Thanks...

share|improve this question

Yes, you set up a local DNS server, and you only make it listen to your local IP's. You then add the domain to your local DNS server and set is as your primary DNS. Then you get your local IP returned by the DNS.

share|improve this answer

You can use "split view" or "split horizon" DNS. That means that users from inside your network have different DNS answers from those outside.

Here's a guide for setting this up with bind9:

share|improve this answer
Thanks, but I don't know what next. I have subdomain forwarded on my server (not entire domain). I need this DNS record only for my local network, not external. I tried to create zone file with this subdomain but it didn't work. – kok Aug 6 '11 at 13:33
In that case, you only declare one zone, and serve it only to your local network, and in that zone you declare your server as having its internal IP. That way, when an internal client does a request for the server's IP, it gets the internal one. – vlad Aug 6 '11 at 17:09

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.