I have a web server hosted in the network. It has a domain name registered. However, I also host a DNS server for the LAN. So, when someone wants to access the web server, it would check the DNS server and use the internal address 192.168.x.x. The web server's public address is 203.x.x.x.
When my computer is working fine, I would ping or try nslookup www.mydomain.com. Both points to 192.168.x.x which is internal address. Sometimes, I or someone could not access www.mydomain.com. When I check, nslookup returns the internal address. But when I ping, it would try to connect using the public address like this.
Pinging www.mydomain.com [203.x.x.x] with 32 bytes of data:
If that happens, repairing the connection mostly help. Sometimes, the workstation (Win XP) has to be restarted. In DNS settings of the workstations, primary DNS points to the DNS Sserver and secondary DNS points to ISP DNS server.
What I want to know is the cause of this problem and prevention from it? Or a better fix than my current ones. Thanks