I'm setting up a BIND nameserver on my Linux server computer. Now if BIND asks me for a IP address for a A Record, should i enter my local ip ( or my external ip ( All webservers etc. run in the same network as the nameserver (even the same computer).

2 Answers 2


Give it the address for the interface you want the other computers to use. If you want them coming in on the 192 interface, give it that address.


If the only hosts needing to resolve DNS are on your local network, then you would use your private IP address (192.168.x.x). This is commonly used for company intranets, so you can have a site setup like hxxp://email/ or hxxp://helpdesk/

If you would like the general public to be able to resolve your domain (foo.com) to the IP address of your webserver, then you will have to bind the nameserver to your public address. (80.x.x.x)

This of course is assuming your public facing interface has no firewall rules preventing traffic. If you are sitting behind certain types of devices (NAT), then you would be able to use a pivate IP address (192.168.x.x). Without any more information, I am going to assume you NEED to use your public IP (80.x.x.x) in order for someone across the country to use it.

  • This solved it! So if i have a computer in another country whatever and if he goes to foo.com and wants go get to my webserver, i use 192. Can mark as answer in 5 mins :(
    – Sydcul
    Commented Jan 10, 2013 at 21:37
  • 1
    No. If you want the public to be able to resolve your domain name using your nameservers, then you need to bind the service to your public IP ( and make sure there are no firewall rules preventing incoming connections. Commented Jan 10, 2013 at 21:39
  • 1
    If you are running a DNS server that ONLY local machines will use. (i.e: small company intranet wants to create a faux domain my.website then you would use the private IP (192.168.x.x) Commented Jan 10, 2013 at 21:41
  • 1
    Sometimes you need to do both. In this case you either run two servers (one internal, one external) with the internal server deferring to the external server when it does not have a defined answer, or you run a single server that is connected to both networks that implements "views" based on source IP address. In the latter case, make sure that adequate security measures are in place to prevent a break-in from granting access to your local network.
    – Andrew B
    Commented Jan 10, 2013 at 22:05
  • I should also add that even if access to the local network isn't granted in the latter case, it would still give them the ability to manipulate the DNS of your workstations. Ill-advised all around, really.
    – Andrew B
    Commented Jan 10, 2013 at 22:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .