• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 328
  • Last Modified:

Web Servers not accessible due to Nat and external DNS

we have a linux machine and an NT webserver which is visible from the outside of the organization thru NAT, using a statememt like:

ip nat inside source static tcp 80 80 extendable.

browsing the webserver from outside the org. works fine.  However, when we attempt to browse the website from machines from within the org. we get permission dialogs and authentification errors.  This is because essentially, we are trying the browse the router from the inside interface.  Ie, DNS queries for the domain and finds that is the ip address the website is on.  It then tries to connect to this address, but thru the internal router network card.  This causes the login dialog to appear.

Is there a way to tell the router that is should redirect traffic which connects to the external network card via the internal network card on a specific port (i.e. only on port 80, 21 etc) back using the NAT settings?


  • 2
1 Solution
You have (at least) three options:
The router will change dns replies if there is a static one-to-one nat ie:
ip nat inside source static

This is the easiest but require that you actually have a specific ip address to use for each server.
Put the servers on a separate leg of the router, and make the same NAT from inside as from the outside.

This gives you the added benefit of a more secure solution, but is the most expensive.
Setup an internal dns-server with the correct replies for the inside addresses.
This solution can be used in most cases but involves the most work and administrative overhead if you have more servers.
ossentooAuthor Commented:
I've actually implemented the third solution.  However, if the linux machine which actually hosts the DNS record is switched on first, and then the webserver is switched on after some clients machines have been turned on, the clients get there DNS queries answered by the linux machine, which then informs them that the DNS record for motorsport.co.ug is  

As the webserver is actually at a 192.168.1 address, the client fails and needs to be rebooted in order to get the correct DNS address of 192.168.1.*.  
What I meant by solution 3 was to setup a dns server on the inside that would actually respond with the 192.168.1.* address of motorsport.co.ug, whenever inside clients asked.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now