cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
584
Views
0
Helpful
1
Replies

How to setup Port forwarding with two gateways

Luke Fahey
Level 1
Level 1

Hey Guys

I have a pretty simple network and have some questions in regards to port forwarding with two gateways. Please see the attached file for reference.

Basically what i would like to achieve is enable port 80 port forwards from two gateways on the same subnet to my webserver. The issue we face is the port forwarding works fine for the default router as it is the default gateway of the network. How do i allow the webserver to respond to requests from the secondary router. Is there a route command i need to add on the primary router so it is aware of the second router, or is the only option to have the second router on a seperate network and install two nic's in the web server

1 Reply 1

Nagaraja Thanthry
Cisco Employee
Cisco Employee

Hello,

On the second router, please try the following:

interface FastEthernet0/0

description Internet_Conn

ip address 10.1.1.2 255.255.255.0

no ip nat outside

ip nat enable

duplex auto

speed auto

!

interface FastEthernet0/1

description LAN

ip address 192.168.1.1 255.255.255.0

no ip nat inside

ip nat enable

duplex auto

speed auto

ip nat source static "webserver_Priv_ip" "webserver_pub_ip" extendable

access-list 101 permit ip any host webserver_pub_ip

route-map WebServer

match ip address 101

exit

ip nat pool IntHosts "Free LAN address" "Free LAN address" netmask

255.255.255.0

ip nat source route-map WebServer pool IntHosts

This will NAT all the internet addresses to "Free LAN address" when the

request comes from the second internet connection. This way, the server will

respond back to the second router and router will be able to translate the

address back to its original internet address.

Hope this helps.

Regards,

NT

Review Cisco Networking for a $25 gift card