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

Port forwarding

Krasnoperov
Level 1
Level 1

Hi, I have some questions about port forwarding on Cisco router and *nix ip tables dnat

Am I right in my guess?

When I have a Router with LAN interface 10.1.1.1/32 ip address and WAN Dialer interface with 5.5.5.5/32 ip address and I make port fowarding from WAN to LAN like this:

ip nat inside source static tcp 10.1.1.2 80 5.5.5.5 8080

that means packet which come to my WAN interface will be open by my Router, and it will change destination field from 5.5.5.5:8080 to 10.1.1.2:80, and then forward to LAN 10.1.1.2:80

same operation for *nix router when doing DNAT

IPTABLES -t nat -A PREROUTING -p TCP -d 5.5.5.5 --dport 8080 -j DNAT --to-destination 10.1.1.2:80

means packet which come to my WAN interface will be open by my *nix router,  and it will change destination field from 5.5.5.5:8080 to 10.1.1.2:80,  and then forward to LAN 10.1.1.2:80

Am I right that is same operations *nix call it DNAT cisco call it port forwarding? or cisco use other mechanism when port forwarding occurs, and it does not change packet header int destination field?

thanks

1 Reply 1

Hi,

Yes this is the way you can do this translation. You must define (ip nat inside on lan interface, ip nat outside on wan interface) your inside and outside interface too and have the port open on your wan interface ofcourse.

In ASA/PIX is a bit different.

Regards,

Alex

Review Cisco Networking for a $25 gift card