Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have a router with nat to web server inside LAN. Also i have internal DNS server on centos. When i try to access web server from internet it works fine, but when i try to access from the LAN, DNS returns public ip and cannot access to web server. How must i confgure named DNS server to avoid this problem? Thanks.

share|improve this question

closed as off-topic by Ward, Falcon Momot, Jenny D, MadHatter, dawud Sep 12 '13 at 15:28

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is a site dedicated to professionals; novice questions are off-topic. Please see the Help Center for more information on topicality. The best advice we can give you is to hire a professional to help you out." – Ward, Falcon Momot, Jenny D, MadHatter, dawud
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 0 down vote accepted

The router, if configured properly should allow lan clients to see lan content properly NAT'd from the public IP.

We'll need to know what DNS server you are asking about.

You're after split horizon DNS. There is more information on the web about the topic than anyone could shack a stick at.

share|improve this answer
The router is configured properly and works fine from wan to lan. – Abraham Borbujo Sep 11 '13 at 21:09
Problem solved by creating two files for diferent zones. So now i can resolve public ip from WAN and redirected to my server with router NAT. In the other way, i resolve private ip from LAN and have direct access to my server without envolving router. In DHCP i have my DNS server as primary and public one as secondary. This is the way i can access the server with the same domain name from wan or lan. – Abraham Borbujo Sep 11 '13 at 23:35

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