Ever needed to change an existing portforwarding on a Cisco switch / router ? Or needed to add a new portforwarding? This is a short howto..
1) First connect to the switch by telnet
e.g. telnet <<IP or HOSTNAME>> <<PORT; default 23>>
2) Login on the Cisco device with your admin credentials
3) Look at the existing port forwardings:
sh run | i ip nat inside source static
4) Check if you’re portforwarding is there, if not, you can just add a new one
5) Let’s get into the configuration mode
conf t
6 ) If you want to change an existing port forwarding, you must clear the existing translation table
do clear ip nat translation *
7) If you want to change an existing port forwarding, you must remove this one by typing
no ip nat inside source static <<Protocol>> <<IP address>> <<PORT>> <<INTERFACE>> <<LISTEN_PORT>>
Add a new port forwarding by typing
ip inside source static <<Protocol>> <<IP address>> <<PORT>> <<INTERFACE>> <<LISTEN_PORT>>
9) Alow port to be used by typing:
do sh ip acce f0/0-in
ip access-list ex f0/0-in
no 31
31 permit tcp any any eq 80
10) End configure session
CTRL Z
11) Save config
copy run start
12) That’s it!