Cisco Port Forward

From SysadminPunk Wiki!

Jump to: navigation, search

Get to the Router or ASA

Static NAT

  • For Redirecting External Traffic on PortA to Internal PortB
access-list outside_inside extended permit tcp any host 77.97.177.77 eq {portA} 
static (inside,outside) tcp interface {portA} 172.16.1.168 {portB} netmask 255.255.255.255

{portA} = External Port {portB} = Internal Port

  • Example - External Port 8878 to internal port 80(www) on host 172.16.1.168
access-list outside_inside extended permit tcp any host 77.97.177.77 eq 8878 
static (inside,outside) tcp interface 8878 172.16.1.168 www netmask 255.255.255.255
  • Example - External Port 10000 to Internal port 80(www) on host 172.16.1.168 + External Port 10001 to Internal Port 10001 on host 172.16.1.168
access-list inside_outside extended permit tcp host 172.16.1.168 any eq 10001
access-list inside_outside extended permit tcp host 172.16.1.168 any eq 10000
static (inside,outside) tcp interface 10000 172.16.1.168 www netmask 255.255.255.255
static (inside,outside) tcp interface 10001 172.16.1.168 10001 netmask 255.255.255.255


Standard Port Forwarding

  • For Redirecting External Traffic on PortA to Internal PortA (When port is the same)
access-list outside_inside line 33 extended permit tcp any host 77.97.177.77 eq {portA}
access-list inside_outside line 87 extended permit tcp host 172.16.1.168 any eq {portA}

{portA} = External Port {portA} = Internal Port

  • Example
access-list outside_inside line 33 extended permit tcp any host 77.97.177.77 eq 10000
access-list inside_outside line 87 extended permit tcp host 172.16.1.168 any eq 10000
Personal tools