Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

My company's router is Zyxel P-320W and I have a public static IP.
I registered a few domains name and point to this IP address.
I already setup Virtual Hosts and configured port-forwarding to my internal server and it works well. I can connect to all domains from outside

The problem is I cannot connect to my domains from inside One workaround way is modify hosts file to add internal IP for those domains, but my company have many computers and I don't want to setup all PC manually

share|improve this question

migrated from superuser.com Apr 17 '10 at 10:24

This question came from our site for computer enthusiasts and power users.

1  
I've come across this problem on a few routers, where there simply wasn't a way of configuring the router to allow this configuration that you want. My solution was replacing the router or adding records to the local dns server. I can't remember whether it was a Zyxel or not though. –  kaerast Apr 17 '10 at 17:27

2 Answers 2

up vote 2 down vote accepted

Split DNS is the solution. Provide the public address to requests from outside the LAN and the local address to requests from inside the LAN. Do NOT go the way of the hosts file. That road is littered with broken systems and insane administrators. As many of us have learned, one small mistake or oversight and you could spend more time sorting out the issue than you can believe possible.

share|improve this answer

Just configure a local caching/authoritative DNS server to reply with the internal IPs of your domains and use your router as upstream DNS server (forwarder). Then configure all machines to use that DNS server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.