Solved

ASA 5500 Port Forwarding To DMZ

Posted on 2009-05-03
10
936 Views
Last Modified: 2012-06-21
Trying to forward tcp 5100 from outside to an address inside the DMZ. Getting a access denied by group "outside_access_in." Please advise. Running config:

Result of the command: "sh run"

: Saved
:
ASA Version 7.2(4)
!
hostname ciscoasa
domain-name default.domain.invalid
enable password 8n.l7k4/UF.EIuWl encrypted
passwd  encrypted
names
name 192.168.1.154 BMFTPSever
name 172.20.1.1 Router
name 24.x.x.x OutsideIP
name 72.x.x.x TFtest
!
interface Vlan1
 nameif inside
 security-level 100
 ip address 192.168.1.245 255.255.255.0
!
interface Vlan2
 nameif outside
 security-level 0
 ip address OutsideIP 255.255.255.252
!
interface Vlan3
 no forward interface Vlan1
 nameif dmz
 security-level 50
 ip address 172.20.1.254 255.255.255.0
!
interface Ethernet0/0
 switchport access vlan 2
!
interface Ethernet0/1
!
interface Ethernet0/2
!
interface Ethernet0/3
 switchport access vlan 3
!
interface Ethernet0/4
!
interface Ethernet0/5
!
interface Ethernet0/6
!
interface Ethernet0/7
!
ftp mode passive
dns server-group DefaultDNS
 domain-name default.domain.invalid
same-security-traffic permit intra-interface
object-group service EZ tcp
 port-object range 5100 5100
access-list inside_access_in extended permit tcp any any inactive
access-list outside_1_cryptomap extended permit ip 192.168.1.0 255.255.255.0 192.168.5.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip interface outside host 74.x.x.x
access-list inside_nat0_outbound extended permit ip 192.168.1.0 255.255.255.0 192.168.5.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip 192.168.1.0 255.255.255.0 192.168.10.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip 192.168.1.0 255.255.255.0 192.168.0.0 255.255.255.0
access-list outside_2_cryptomap extended permit ip 192.168.1.0 255.255.255.0 192.168.10.0 255.255.255.0
access-list outside_3_cryptomap extended permit ip 192.168.1.0 255.255.255.0 192.168.0.0 255.255.255.0
access-list outside_access_in extended permit tcp any host BMFTPSever eq ftp-data
access-list outside_access_in extended permit tcp any host BMFTPSever eq ftp
access-list outside_access_in extended permit tcp any host BMFTPSever eq ssh
access-list outside_access_in extended permit tcp host OutsideIP host Router range 5100 5100
access-list acl_dmz extended permit ip 172.20.1.0 255.255.255.0 any
access-list acl_outside extended permit tcp any host TFtest eq 5100
pager lines 24
logging enable
logging asdm informational
mtu inside 1500
mtu outside 1500
mtu dmz 1500
ip verify reverse-path interface inside
icmp unreachable rate-limit 1 burst-size 1
icmp deny any echo outside
asdm image disk0:/asdm-524.bin
no asdm history enable
arp timeout 14400
nat-control
global (outside) 1 interface
nat (inside) 0 access-list inside_nat0_outbound
nat (inside) 1 0.0.0.0 0.0.0.0
static (outside,dmz) tcp Router 5100 OutsideIP 5100 netmask 255.255.255.255
static (dmz,outside) tcp interface 5100 Router 5100 netmask 255.255.255.255
access-group outside_access_in in interface outside
access-group acl_dmz in interface dmz
route outside 0.0.0.0 0.0.0.0 24.x.x.x 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
http server enable
http 192.168.1.0 255.255.255.0 inside
http 192.168.0.0 255.255.255.0 inside
http 192.168.10.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
sysopt noproxyarp inside
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto ipsec transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac
crypto map outside_map 1 match address outside_1_cryptomap
crypto map outside_map 1 set pfs group5
crypto map outside_map 1 set peer 74.x.x.x
crypto map outside_map 1 set transform-set ESP-AES-256-SHA
crypto map outside_map 2 match address outside_2_cryptomap
crypto map outside_map 2 set pfs group5
crypto map outside_map 2 set peer 66.x.x.x
crypto map outside_map 2 set transform-set ESP-AES-256-SHA
crypto map outside_map 3 match address outside_3_cryptomap
crypto map outside_map 3 set pfs group5
crypto map outside_map 3 set peer 70.x.x.x
crypto map outside_map 3 set transform-set ESP-AES-256-SHA
crypto map outside_map interface outside
crypto isakmp enable outside
crypto isakmp policy 10
 authentication pre-share
 encryption 3des
 hash sha
 group 2
 lifetime 86400
crypto isakmp policy 30
 authentication pre-share
 encryption aes-256
 hash sha
 group 5
 lifetime 86400
telnet timeout 5
ssh timeout 5
console timeout 0
dhcpd auto_config outside
!

tunnel-group 74.x.x.x type ipsec-l2l
tunnel-group 74.x.x.x ipsec-attributes
 pre-shared-key *
tunnel-group 70.x.x.x type ipsec-l2l
tunnel-group 70.x.x.x ipsec-attributes
 pre-shared-key *
tunnel-group 66.x.x.x type ipsec-l2l
tunnel-group 66.x.x.x ipsec-attributes
 pre-shared-key *
!
class-map inspection_default
 match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
 parameters
  message-length maximum 512
policy-map global_policy
 class inspection_default
  inspect dns preset_dns_map
  inspect ftp
  inspect h323 h225
  inspect h323 ras
  inspect rsh
  inspect rtsp
  inspect esmtp
  inspect sqlnet
  inspect skinny
  inspect sunrpc
  inspect xdmcp
  inspect sip
  inspect netbios
  inspect tftp
!
service-policy global_policy global
prompt hostname context
Cryptochecksum:e84563a6d3b2bcf77b5e477556b3c937
: end
0
Comment
Question by:progonosko
  • 5
  • 5
10 Comments
 
LVL 19

Expert Comment

by:nodisco
Comment Utility
hey there

By the looks of things you are trying to port forward port 5100 from the PIX outside interface to the a machine called Router on 172.20.1.1 in the DMZ but the config is incorrect.  If this is the case, here is what you need to do:

conf t
no access-list outside_access_in extended permit tcp host OutsideIP host Router range 5100 5100
access-list outside_access_in extended permit tcp any interface outside eq 5100
no static (outside,dmz) tcp Router 5100 OutsideIP 5100 netmask 255.255.255.255
clear xlate
access-group outside_access_in in interface outside

That should do it.  If you are unclear or are trying to achieve something different, pls advise.

thanks

0
 

Author Comment

by:progonosko
Comment Utility
Applied this and now I don't see any traffic hitting the Outside interface.
0
 
LVL 19

Expert Comment

by:nodisco
Comment Utility
Can you repost your config and the output of
sh access-list outside_access_in

Can you confirm - you wish to have traffic destined for the firewalls outside interface on port 5100 port translated to 172.20.1.1 in your dmz correct?

cheers
0
 

Author Comment

by:progonosko
Comment Utility
Yes, you are correct, that is what I want to do. I will post the configs in the morning - thanks for your help.
0
 
LVL 19

Expert Comment

by:nodisco
Comment Utility
no worries
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:progonosko
Comment Utility
Result of the command: "sh access-list outside_access_in"

access-list outside_access_in; 4 elements
access-list outside_access_in line 1 extended permit tcp any host BMFTPSever eq ftp-data (hitcnt=0) 0x1247e883
access-list outside_access_in line 2 extended permit tcp any host BMFTPSever eq ftp (hitcnt=0) 0x9af40447
access-list outside_access_in line 3 extended permit tcp any host BMFTPSever eq ssh (hitcnt=0) 0x5e8c8ce1
access-list outside_access_in line 4 extended permit tcp any interface outside eq 5100 (hitcnt=0) 0x15c1862b


Result of the command: "sh run"

: Saved
:
ASA Version 7.2(4)
!
hostname ciscoasa
domain-name default.domain.invalid
enable password  encrypted
passwd  encrypted
names
name 192.168.1.154 BMFTPSever
name 172.20.1.1 Router
name 24.x.x.x OutsideIP
name 72.x.x.x TFtest
!
interface Vlan1
 nameif inside
 security-level 100
 ip address 192.168.1.245 255.255.255.0
!
interface Vlan2
 nameif outside
 security-level 0
 ip address OutsideIP 255.255.255.252
!
interface Vlan3
 no forward interface Vlan1
 nameif dmz
 security-level 50
 ip address 172.20.1.254 255.255.255.0
!
interface Ethernet0/0
 switchport access vlan 2
!
interface Ethernet0/1
!
interface Ethernet0/2
!
interface Ethernet0/3
 switchport access vlan 3
!
interface Ethernet0/4
!
interface Ethernet0/5
!
interface Ethernet0/6
!
interface Ethernet0/7
!
ftp mode passive
dns server-group DefaultDNS
 domain-name default.domain.invalid
same-security-traffic permit intra-interface
object-group service EZF tcp
 port-object range 5100 5100
access-list inside_access_in extended permit tcp any any inactive
access-list outside_1_cryptomap extended permit ip 192.168.1.0 255.255.255.0 192.168.5.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip interface outside host 74.x.x.x
access-list inside_nat0_outbound extended permit ip 192.168.1.0 255.255.255.0 192.168.5.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip 192.168.1.0 255.255.255.0 192.168.10.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip 192.168.1.0 255.255.255.0 192.168.0.0 255.255.255.0
access-list outside_2_cryptomap extended permit ip 192.168.1.0 255.255.255.0 192.168.10.0 255.255.255.0
access-list outside_3_cryptomap extended permit ip 192.168.1.0 255.255.255.0 192.168.0.0 255.255.255.0
access-list outside_access_in extended permit tcp any host BMFTPSever eq ftp-data
access-list outside_access_in extended permit tcp any host BMFTPSever eq ftp
access-list outside_access_in extended permit tcp any host BMFTPSever eq ssh
access-list outside_access_in extended permit tcp any interface outside eq 5100
access-list acl_dmz extended permit ip 172.20.1.0 255.255.255.0 any
access-list acl_outside extended permit tcp any host TFtest eq 5100
pager lines 24
logging enable
logging asdm informational
mtu inside 1500
mtu outside 1500
mtu dmz 1500
ip verify reverse-path interface inside
icmp unreachable rate-limit 1 burst-size 1
icmp deny any echo outside
asdm image disk0:/asdm-524.bin
no asdm history enable
arp timeout 14400
nat-control
global (outside) 1 interface
nat (inside) 0 access-list inside_nat0_outbound
nat (inside) 1 0.0.0.0 0.0.0.0
static (dmz,outside) tcp interface 5100 Router 5100 netmask 255.255.255.255
access-group outside_access_in in interface outside
access-group acl_dmz in interface dmz
route outside 0.0.0.0 0.0.0.0 24.x.x.x 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
http server enable
http 192.168.1.0 255.255.255.0 inside
http 192.168.0.0 255.255.255.0 inside
http 192.168.10.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
sysopt noproxyarp inside
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto ipsec transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac
crypto map outside_map 1 match address outside_1_cryptomap
crypto map outside_map 1 set pfs group5
crypto map outside_map 1 set peer 74.x.x.x
crypto map outside_map 1 set transform-set ESP-AES-256-SHA
crypto map outside_map 2 match address outside_2_cryptomap
crypto map outside_map 2 set pfs group5
crypto map outside_map 2 set peer 66.x.x.x
crypto map outside_map 2 set transform-set ESP-AES-256-SHA
crypto map outside_map 3 match address outside_3_cryptomap
crypto map outside_map 3 set pfs group5
crypto map outside_map 3 set peer 70.x.x.x
crypto map outside_map 3 set transform-set ESP-AES-256-SHA
crypto map outside_map interface outside
crypto isakmp enable outside
crypto isakmp policy 10
 authentication pre-share
 encryption 3des
 hash sha
 group 2
 lifetime 86400
crypto isakmp policy 30
 authentication pre-share
 encryption aes-256
 hash sha
 group 5
 lifetime 86400
telnet timeout 5
ssh timeout 5
console timeout 0
dhcpd auto_config outside
!

tunnel-group 74.x.x.x type ipsec-l2l
tunnel-group 74.x.x.x ipsec-attributes
 pre-shared-key *
tunnel-group 70.x.x.x type ipsec-l2l
tunnel-group 70.x.x.x ipsec-attributes
 pre-shared-key *
tunnel-group 66.x.x.x type ipsec-l2l
tunnel-group 66.x.x.x ipsec-attributes
 pre-shared-key *
!
class-map inspection_default
 match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
 parameters
  message-length maximum 512
policy-map global_policy
 class inspection_default
  inspect dns preset_dns_map
  inspect ftp
  inspect h323 h225
  inspect h323 ras
  inspect rsh
  inspect rtsp
  inspect esmtp
  inspect sqlnet
  inspect skinny
  inspect sunrpc
  inspect xdmcp
  inspect sip
  inspect netbios
  inspect tftp
!
service-policy global_policy global
prompt hostname context
Cryptochecksum:
: end
Result of the command: "sh access-list outside_access_in"

access-list outside_access_in; 4 elements
access-list outside_access_in line 1 extended permit tcp any host BMFTPSever eq ftp-data (hitcnt=0) 0x1247e883
access-list outside_access_in line 2 extended permit tcp any host BMFTPSever eq ftp (hitcnt=0) 0x9af40447
access-list outside_access_in line 3 extended permit tcp any host BMFTPSever eq ssh (hitcnt=0) 0x5e8c8ce1
access-list outside_access_in line 4 extended permit tcp any interface outside eq 5100 (hitcnt=0) 0x15c1862b


Result of the command: "sh run"

: Saved
:
ASA Version 7.2(4)
!
hostname ciscoasa
domain-name default.domain.invalid
enable password  encrypted
passwd  encrypted
names
name 192.168.1.154 BMFTPSever
name 172.20.1.1 Router
name 24.x.x.x OutsideIP
name 72.x.x.x TFtest
!
interface Vlan1
 nameif inside
 security-level 100
 ip address 192.168.1.245 255.255.255.0
!
interface Vlan2
 nameif outside
 security-level 0
 ip address OutsideIP 255.255.255.252
!
interface Vlan3
 no forward interface Vlan1
 nameif dmz
 security-level 50
 ip address 172.20.1.254 255.255.255.0
!
interface Ethernet0/0
 switchport access vlan 2
!
interface Ethernet0/1
!
interface Ethernet0/2
!
interface Ethernet0/3
 switchport access vlan 3
!
interface Ethernet0/4
!
interface Ethernet0/5
!
interface Ethernet0/6
!
interface Ethernet0/7
!
ftp mode passive
dns server-group DefaultDNS
 domain-name default.domain.invalid
same-security-traffic permit intra-interface
object-group service EZF tcp
 port-object range 5100 5100
access-list inside_access_in extended permit tcp any any inactive
access-list outside_1_cryptomap extended permit ip 192.168.1.0 255.255.255.0 192.168.5.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip interface outside host 74.x.x.x
access-list inside_nat0_outbound extended permit ip 192.168.1.0 255.255.255.0 192.168.5.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip 192.168.1.0 255.255.255.0 192.168.10.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip 192.168.1.0 255.255.255.0 192.168.0.0 255.255.255.0
access-list outside_2_cryptomap extended permit ip 192.168.1.0 255.255.255.0 192.168.10.0 255.255.255.0
access-list outside_3_cryptomap extended permit ip 192.168.1.0 255.255.255.0 192.168.0.0 255.255.255.0
access-list outside_access_in extended permit tcp any host BMFTPSever eq ftp-data
access-list outside_access_in extended permit tcp any host BMFTPSever eq ftp
access-list outside_access_in extended permit tcp any host BMFTPSever eq ssh
access-list outside_access_in extended permit tcp any interface outside eq 5100
access-list acl_dmz extended permit ip 172.20.1.0 255.255.255.0 any
access-list acl_outside extended permit tcp any host TFtest eq 5100
pager lines 24
logging enable
logging asdm informational
mtu inside 1500
mtu outside 1500
mtu dmz 1500
ip verify reverse-path interface inside
icmp unreachable rate-limit 1 burst-size 1
icmp deny any echo outside
asdm image disk0:/asdm-524.bin
no asdm history enable
arp timeout 14400
nat-control
global (outside) 1 interface
nat (inside) 0 access-list inside_nat0_outbound
nat (inside) 1 0.0.0.0 0.0.0.0
static (dmz,outside) tcp interface 5100 Router 5100 netmask 255.255.255.255
access-group outside_access_in in interface outside
access-group acl_dmz in interface dmz
route outside 0.0.0.0 0.0.0.0 24.x.x.x 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
http server enable
http 192.168.1.0 255.255.255.0 inside
http 192.168.0.0 255.255.255.0 inside
http 192.168.10.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
sysopt noproxyarp inside
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto ipsec transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac
crypto map outside_map 1 match address outside_1_cryptomap
crypto map outside_map 1 set pfs group5
crypto map outside_map 1 set peer 74.x.x.x
crypto map outside_map 1 set transform-set ESP-AES-256-SHA
crypto map outside_map 2 match address outside_2_cryptomap
crypto map outside_map 2 set pfs group5
crypto map outside_map 2 set peer 66.x.x.x
crypto map outside_map 2 set transform-set ESP-AES-256-SHA
crypto map outside_map 3 match address outside_3_cryptomap
crypto map outside_map 3 set pfs group5
crypto map outside_map 3 set peer 70.x.x.x
crypto map outside_map 3 set transform-set ESP-AES-256-SHA
crypto map outside_map interface outside
crypto isakmp enable outside
crypto isakmp policy 10
 authentication pre-share
 encryption 3des
 hash sha
 group 2
 lifetime 86400
crypto isakmp policy 30
 authentication pre-share
 encryption aes-256
 hash sha
 group 5
 lifetime 86400
telnet timeout 5
ssh timeout 5
console timeout 0
dhcpd auto_config outside
!

tunnel-group 74.x.x.x type ipsec-l2l
tunnel-group 74.x.x.x ipsec-attributes
 pre-shared-key *
tunnel-group 70.x.x.x type ipsec-l2l
tunnel-group 70.x.x.x ipsec-attributes
 pre-shared-key *
tunnel-group 66.x.x.x type ipsec-l2l
tunnel-group 66.x.x.x ipsec-attributes
 pre-shared-key *
!
class-map inspection_default
 match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
 parameters
  message-length maximum 512
policy-map global_policy
 class inspection_default
  inspect dns preset_dns_map
  inspect ftp
  inspect h323 h225
  inspect h323 ras
  inspect rsh
  inspect rtsp
  inspect esmtp
  inspect sqlnet
  inspect skinny
  inspect sunrpc
  inspect xdmcp
  inspect sip
  inspect netbios
  inspect tftp
!
service-policy global_policy global
prompt hostname context
Cryptochecksum:
: end


0
 
LVL 19

Accepted Solution

by:
nodisco earned 500 total points
Comment Utility
Ok
access-list outside_access_in line 1 extended permit tcp any host BMFTPSever eq ftp-data (hitcnt=0) 0x1247e883
access-list outside_access_in line 2 extended permit tcp any host BMFTPSever eq ftp (hitcnt=0) 0x9af40447
access-list outside_access_in line 3 extended permit tcp any host BMFTPSever eq ssh (hitcnt=0) 0x5e8c8ce1
access-list outside_access_in line 4 extended permit tcp any interface outside eq 5100 (hitcnt=0) 0x15c1862b

the first 3 lines are not going to get hits as BMFTPServer is an internal ip and is not available on the outside unless its first natted.

The last line will only show hits if you try to open a connection to the outside ip address of the ASA on port 5100 from outside the firewall.
From a remote site - even just try
telnet [public ip of firewall] 5100
0
 

Author Comment

by:progonosko
Comment Utility
So...this is interesting. I did not do the telnet test. I made an adjustment to the ip address of the internal router and now I can see the traffic in the log. I think the remaining obstacle is the router. I'll get back to you soon.
0
 
LVL 19

Expert Comment

by:nodisco
Comment Utility
no worries
0
 

Author Comment

by:progonosko
Comment Utility
Not the router. Traffic is passing, but no access. Telnet is not working either.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

How to configure Site to Site VPN on a Cisco ASA.     (version: 1.1 - updated August 6, 2009) Index          [Preface]   1.    [Introduction]   2.    [The situation]   3.    [Getting started]   4.    [Interesting traffic]   5.    [NAT0]   6.…
When I upgraded my ASA 8.2 to 8.3, I realized that my nonat statement was failing!   The log showed the following error:     %ASA-5-305013: Asymmetric NAT rules matched for forward and reverse flows It was caused by the config upgrade, because t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now