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...
Asked
Active
Viewed 366 times
2 Answers
0
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.

Lucas Kauffman
- 16,880
- 9
- 58
- 93
0
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

vlad
- 111
- 4
-
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 06 '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 06 '11 at 17:09