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...

link|improve this question
feedback

2 Answers

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.

link|improve this answer
feedback

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: http://www.knowplace.org/pages/howtos/split_view_with_bind_9_howto.php

link|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
feedback

Your Answer

 
or
required, but never shown

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