Unable to run local version of example.com on browser

Solution 1:

is it possible that your web browser uses some proxy rather then direct internet connection?

probably not - but still worth asking.

what does your windows nslookup say when you fire it up on computer where you use web browser? does it say that 192.168.1.2 is one and only dns server? what happens when you type example.com as query ?

[edit: i'm blind.. this one should fix the problem] add

@ IN A 91.206.245.2
www IN A 91.206.245.2

to your bind zone file, change serial number and reload bind.

Solution 2:

The DNS server you just installed and configured (BIND) is an authoritative name server. That's fine but you cannot use it as a recursive name server, which is what you did when you "Changed my primary DNS to 192.168.1.2". Hence, nslookup's screams "Got recursion not available from 192.168.1.2, trying next server".

An authoritative name server is... authoritative for some domains (here, example.com) but is not a general-purpose resolving server. For that, you need a recursive name server.

Two solutions:

  1. Make your BIND name server recursive for your local machine. (Basically, it means adding a recursion yes; in a view, or being sure that your BIND listens only on local IP addresses.) Note that it is bad practice to have a name server being both recursive and authoritative but, for a personal machine used only for tests, it is not a big deal.

  2. Tell the regular recursive that it must forwards requests for example.com for your machine. I cannot say more, it depends who manages it, what software it runs, etc.