08-03-2019 09:47 PM
the ISP routes a single IP to our gateway router. So our gateway router is set up this way:
int Gi1 ip address 10.0.0.2 255.255.255.0 int Gi2 ip address 192.168.1.1 255.255.255.0 int Lo0 ip address 1.2.3.4 255.255.255.255 ip route 0.0.0.0 0.0.0.0 10.0.0.1
Now I need to forward port 1.2.3.4:80 -> 192.168.1.2:80, how do I achieve this?
Already tried and doesn't work:
1. ip nat source static tcp 1.2.3.4 80 192.168.1.2 80
2. ip nat pool + ip access-list + ip nat source
Solved! Go to Solution.
08-04-2019 01:45 AM
Hello,
I tested the config below in GNS3 (change the static NAT entries to tcp port 80):
interface Loopback0
ip address 1.2.3.4 255.255.255.255
ip nat inside
!
interface GigabitEthernet1
ip address 10.0.0.2 255.255.255.0
ip nat outside
!
interface GigabitEthernet2
ip address 192.168.1.1 255.255.255.0
ip nat inside
!
ip nat inside source static 192.168.1.2 interface Loopback0
ip nat outside source static 10.0.0.2 1.2.3.4
ip route 0.0.0.0 0.0.0.0 10.0.0.1
and got the debug output below:
R1#debug ip nat
IP NAT debugging is on
R1#
*Aug 4 08:38:45.181: NAT*: s=10.0.0.1, d=1.2.3.4->192.168.1.2 [50]
R1#
*Aug 4 08:38:47.166: NAT*: s=10.0.0.1, d=1.2.3.4->192.168.1.2 [51]
R1#
*Aug 4 08:38:48.167: NAT*: s=192.168.1.2->1.2.3.4, d=10.0.0.1 [50]
*Aug 4 08:38:48.167: NAT*: s=192.168.1.2->1.2.3.4, d=10.0.0.1 [51]
*Aug 4 08:38:48.170: NAT*: s=10.0.0.1, d=1.2.3.4->192.168.1.2 [52]
*Aug 4 08:38:48.170: NAT*: s=192.168.1.2->1.2.3.4, d=10.0.0.1 [52]
*Aug 4 08:38:48.174: NAT*: s=10.0.0.1, d=1.2.3.4->192.168.1.2 [53]
*Aug 4 08:38:48.174: NAT*: s=192.168.1.2->1.2.3.4, d=10.0.0.1 [53]
*Aug 4 08:38:48.179: NAT*: s=10.0.0.1, d=1.2.3.4->192.168.1.2 [54]
*Aug 4 08:38:48.179: NAT*: s=192.168.1.2->1.2.3.4, d=10.0.0.1 [54]
08-04-2019 01:45 AM
Hello,
I tested the config below in GNS3 (change the static NAT entries to tcp port 80):
interface Loopback0
ip address 1.2.3.4 255.255.255.255
ip nat inside
!
interface GigabitEthernet1
ip address 10.0.0.2 255.255.255.0
ip nat outside
!
interface GigabitEthernet2
ip address 192.168.1.1 255.255.255.0
ip nat inside
!
ip nat inside source static 192.168.1.2 interface Loopback0
ip nat outside source static 10.0.0.2 1.2.3.4
ip route 0.0.0.0 0.0.0.0 10.0.0.1
and got the debug output below:
R1#debug ip nat
IP NAT debugging is on
R1#
*Aug 4 08:38:45.181: NAT*: s=10.0.0.1, d=1.2.3.4->192.168.1.2 [50]
R1#
*Aug 4 08:38:47.166: NAT*: s=10.0.0.1, d=1.2.3.4->192.168.1.2 [51]
R1#
*Aug 4 08:38:48.167: NAT*: s=192.168.1.2->1.2.3.4, d=10.0.0.1 [50]
*Aug 4 08:38:48.167: NAT*: s=192.168.1.2->1.2.3.4, d=10.0.0.1 [51]
*Aug 4 08:38:48.170: NAT*: s=10.0.0.1, d=1.2.3.4->192.168.1.2 [52]
*Aug 4 08:38:48.170: NAT*: s=192.168.1.2->1.2.3.4, d=10.0.0.1 [52]
*Aug 4 08:38:48.174: NAT*: s=10.0.0.1, d=1.2.3.4->192.168.1.2 [53]
*Aug 4 08:38:48.174: NAT*: s=192.168.1.2->1.2.3.4, d=10.0.0.1 [53]
*Aug 4 08:38:48.179: NAT*: s=10.0.0.1, d=1.2.3.4->192.168.1.2 [54]
*Aug 4 08:38:48.179: NAT*: s=192.168.1.2->1.2.3.4, d=10.0.0.1 [54]
08-04-2019 02:54 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide