I have a Cisco 3925 on 15.01.

I'm attempting to allow machines on the Engineering network to access a webserver on the Management network on VLAN10 through a Static NAT. The webserver on the Management network is configured for Any Engineering machine can hit the main page of the website at but as soon as I click on a link on the web page NAT appears to stop working. I can see it attempting to load the next webpage from rather than as I think it should until it times out. All webpages loaded from this web server should appear to be loaded from from the perspective of any machine on the Engineering network.

Specific machines on the Management network are allowed to access the internet through interface gi/0/0 but machines on the engineering network are not. That last bit may not be relevant. The webserver also has access to the internet.

Relevant settings here:

Interface gi0/1.10  
 description Management Network  
 ip address  
 ip nat inside  
 encapsulation dot1Q 10  

Interface gi0/2  
 description Engineering Network  
 ip address  
 ip nat outside  

Interface gi0/0/0  
 description Connection to the Internet  
 ip address x.x.x.x  
 ip nat outside  

ip nat inside source list 1 interface GigabitEthernet0/0 overload  
ip nat inside source static  
ip route 0 X.X.X.X <-- default gateway to the internet.  

access-list 1 permit  
access-list 1 permit  
access-list 1 permit  
access-list 1 deny any  

Any suggestions on how I can fix this?

  • Why do you want to NAT when it is unnecessary? NAT is a kludge to try to extend IPv4 until IPv6 becomes ubiquitous. It breaks the IP end-to-end paradigm, and it adds unnecessry complexity. You should never use NAT unless you need to. You can simply route between the Management and Engineering networks.
    – Ron Maupin
    Mar 7, 2017 at 14:25
  • Agreed. Normally I would simply route between the two networks. However, this is being dictated by company policy. They wish to limit access that Engineers may have to the Management network and only provide access/network connectivity to this single webserver within the Management network. I believe ACLs could be used here as well but my supervisor wants to me to get NAT working as an alternative. Mar 7, 2017 at 14:34
  • That would be the case for using an ACL, not NAT. Place an inbound extended ACL on G0/2 that allows traffic to the web server address and blocks traffic to all other addresses on that network. You should use the correct tool for the job. NAT has nothing to do with security, but ACLs do.
    – Ron Maupin
    Mar 7, 2017 at 14:37
  • Once again I agree. ACL should be used here. But my hands are tied and I'm being told I have to use a solution that involves NAT. Is it even possible to use NAT to accomplish this? Mar 7, 2017 at 14:41
  • 2
    As I said, NAT has nothing to do with security, and it will not prevent hosts on one network from communicating with hosts on the other network. You can use NAT, but that doesn't accomplish anything to do with preventing access. That would be for an ACL. As I wrote, NAT breaks the end-to-end paradigm, and it messes up some things. If the web pages are hard-coded to use specific IP addresses, NAT cannot deal with that.
    – Ron Maupin
    Mar 7, 2017 at 14:46

2 Answers 2


This is not an issue with your static NAT configuration - but actually with the content on the pages the web server is dishing out.

In most cases, a web server sh/would return relative links eg:

<a href="/some/other/location.html">Link</a>

in your case, it is returning absolute links in the form:

<a href="">Link</a>

NAT occurs at Layer 3 - the web server returning links with it's address encoded into the URL is happening at Layer 7, and beyond the control of your router.

Static NAT is the wrong tool for the job in this case - explain to your Supervisor that the only way to resolve this issue is to use an ACL or have the web application re-written.


After reading your comment, it appears that you have a need for an ACL instead of NAT. NAT is a method to save address space, essentially. Try doing this:

Router(config)# ip access-list extended ACL

Router(config-ext-nacl)# permit tcp host eq www

Router(config-ext-nacl)# deny tcp any host eq www

Router(config-ext-nacl)# exit

ACLs look at their rules in a top-down fashion. So, when a packet enters an interface, the ACL will start at the top and work its way down the list until the packet matches a rule. If there is no rule in the ACL which addresses a packet, the packet gets dropped.

This is just an example configuration. You should read up on ACLs to ensure that you use the proper configuration for your situation.

The first step creates an extended ACL and moves the user to Extended ACL Configuration Mode.

The second step creates an ACL rule which allows traffic from all hosts in subnet to reach the web server at using destination TCP port 80 (HTTP). Note that ACLs use wildcard masks (e.g. to describe a subnet mask, rather than the typical subnet mask you would use when creating static routes, DHCP pools, etc.

The third step denies all other hosts from accessing the web server via HTTP.

Next, you need to assign the ACL to an interface. With extended ACLs, you want to configure the router interface which is closest to the source. So, whichever interface is connected to the needs to have your new ACL configured. We'll just use g0/1 as a placeholder for this example.

Router# configure terminal

Router(config)# interface GigabitEthernet 0/1

Router(config-if)# ip access-group ACL in

Router(config-if)# end

Finally, the last steps show how to configure your new ACL on the incoming interface of your router.

Good luck. And don't forget to remove your NAT configs first.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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