Cisco – How to configure port to port forwarding on ASA 5512-X

ciscocisco-asa

Below is the config. The port redirection is working, but the range of the ports and other ports permitted in the access-list are not opening:

object network TEST_PUBLIC_IP

host 10.10.10.10

object-group service PROD_101 tcp
port-object eq 8443
port-object eq 922
port-object eq ssh
port-object eq https
port-object range 8000 8200

object network TEST_PRIVATE_IP

host 1.1.1.1.
nat (PRODUCTION,OUTSIDE) static TEST_PUBLIC_IP service tcp 8085 www

access-list Outside_IN extended permit tcp any object TEST_PRIVATE_IP object-group PROD_101

access-group Outside_IN in interface outside

Best Answer

With the ASA code 8.3+, you need to specify the real IP address and the real port in the inbound outside access list. Based on the configuration you provided, if you add:

object-group service PROD_101 tcp
port-object eq www

It should fix your problem.

EDIT: Working configuration for the other ports

object service TCP-SOURCE-22 
 service tcp source eq 22 

nat (PRODUCTION,OUTSIDE) source static TEST_PRIVATE_IP TEST_PUBLIC_IP service TCP-SOURCE-22 TCP-SOURCE-22 

object service TCP-SOURCE-8000_8200 
 service tcp source range 8000 8200 

nat (PRODUCTION,OUTSIDE) source static TEST_PRIVATE_IP TEST_PUBLIC_IP service TCP-SOURCE-8000_8200 TCP-SOURCE-8000_8200