1

I have a public url like app1.wifi.com,so that I can access my url from anywhere. Now I want to set that same url to my local machine. If I type app1.wifi.com from my LAN, it should routed to local app1.wifi.com. To achieve this, I tried the below configuration.

I have a Windows 7 machine, where I installed BIND9, I set that machine IP to 192.168.1.2 and named it app1.wifi.com. It is connected with a router (192.168.1.1). In BIND conf, I have 2 forward look up zones and 2 reverse lookup zones. In addition, I have . zone

1)localhost
2)0.0.127.in-addr.arpa (reverse lookup)
3)wifi.com
4)1.168.192.in-addr.arpa(reverse lookup of wifi.com).

I'm able to communicate with external urls (Google, Yahoo...) from 192.168.1.2.

On the other end of the router I have another machine connected to the same network with an IP of 192.168.1.3. On 192.168.1.3, I set the DNS server IP as 192.168.1.2. If I ping app1.wifi.com from 192.168.1.3,the result is:

ping app1.wifi.com.

Ping request could not find host app1.wifi.com. Please check the name and try again.

C:\windows\system32>nslookup app1.wifi.com
DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown
Address:  192.168.1.2

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
*** Request to UnKnown timed-out

C:\windows\system32>

How do I get this working with app1.wifi.com locally? I'm able to communicate with external urls (Google, Yahoo...) from 192.168.1.2, but not from 192.168.1.3. The result of an nslookup from 192.168.1.3 is below:

nslookup google.com
Server:  UnKnown
Address:  192.168.1.2

------------
SendRequest(), len 28
    HEADER:
        opcode = QUERY, id = 11, rcode = NOERROR
        header flags:  query, want recursion
        questions = 1,  answers = 0,  authority records = 0,  additional = 0

    QUESTIONS:
        google.com, type = A, class = IN

------------
DNS request timed out.
    timeout was 10 seconds.
timeout (10 secs)
SendRequest failed.

And on 192.168.1.2, I'm not getting any queries from 192.168.1.3 (I set the ACL to 192.168.1/24).

Note: Important thing is that 192.168.1.2 should communicate with external urls. This machine should communicate with app2.wifi.com, so in this case how do I set up domain name locally and configure app1.wifi.com locally?

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
vijai
  • 11
  • 3

1 Answers1

1

First start with checking basic connectivity to the DNS server from your host, so from 192.168.1.3 ping 192.168.1.2. IMPORTANT: you said that you installed the DNS server on a windows 7 machine. Windows 7 has a build in firewall which blocks ping requests. So you probably will have to allow ping ( also make sure that you can receive incoming DNS requests on the DNS server).

Next: try to resolve the domain on the DNS server itselves: so on 192.168.1.2 do a ping to app1.wifi.com. See to what the DNS resolves.

If the DNS resolves ok from the DNS server itselves try again from the host. If the host has connectivity with the DNS server , and DNS queries are allowed trough the firewall normally the resolution should work.

Also, if it still does not resolve correctly, can you give us the zonefile of wifi.com? so we can check that for errors.

Goez
  • 1,788
  • 1
  • 10
  • 15
  • Thank you Goez,OMG.. i forgot firewall... Windows fire wall creates that proplem,so now i'm able to ping app1.wifi.com from 192.168.1.3.But now i want to access app2.wifi.com which is an external url.so i tried C:\windows\system32>nslookup app2.wifi.com Server: app1.wifi.com Address: 192.168.1.2 *** app1.wifi.com can't find app2.wifi.com: Non-existent dom ain. Because both domain name are same.so what to do to access app2.wifi.com(atleast from 192.168.1.2). – vijai Aug 21 '12 at 07:52
  • That will be a problem since you have the same zone. I would add app2.wifi.com to your zonefile with the external IP. This way you will resolve app1 to a local address and app2 to an external address. Do NOT forget to increase the serial of the zonefile when altering ! – Goez Aug 21 '12 at 07:56