cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1421
Views
0
Helpful
6
Replies

Cisco ASA 5505 - DMZ Web Server help!

marcdiggins
Level 1
Level 1

Hi guys,

Hope this is the right place to ask this! I'm totally at a loss - I have a web server in a DMZ (asa 5505, asa version 9.2(2)4). I can access the web site through the inside network, but I cannot for the life of me figure out how to access from the internet. My running config is below:

Result of the command: "show run"

: Saved
:
: Serial Number: JMX1425Z0US
: Hardware:   ASA5505, 512 MB RAM, CPU Geode 500 MHz
:
ASA Version 9.2(2)4
!
hostname ciscoasa
domain-name thg.com
enable password kuGp1VnPyLjHx563 encrypted
names
!
interface Ethernet0/0
 switchport access vlan 2
!
interface Ethernet0/1
!
interface Ethernet0/2
!
interface Ethernet0/3
!
interface Ethernet0/4
!
interface Ethernet0/5
!
interface Ethernet0/6
!
interface Ethernet0/7
 switchport access vlan 5
!
interface Vlan1
 nameif inside
 security-level 100
 allow-ssc-mgmt
 ip address 192.168.1.1 255.255.255.0
!
interface Vlan2
 nameif outside
 security-level 0
 ip address 209.87.229.198 255.255.255.240
!
interface Vlan5
 nameif dmz
 security-level 50
 ip address 192.168.200.1 255.255.255.0
!
ftp mode passive
dns server-group DefaultDNS
 domain-name thg.com
object network obj_any
 subnet 0.0.0.0 0.0.0.0
object network WebServer
 host 192.168.200.100
 description WebServer
object network OutsideIP
 host 209.87.229.193
 description OutsideIP
object network DMZ_Outside
 subnet 0.0.0.0 0.0.0.0
object network DMZ_outside
 subnet 0.0.0.0 0.0.0.0
object network web-server-fromOutside
 host 192.168.200.100
object network web-server-fromInside
 host 192.168.200.100
object network inside
 subnet 192.168.1.0 255.255.255.0
object network Webserver
 host 192.168.200.100
object network webserver
 host 192.168.200.100
access-list outside_access_in extended permit tcp any object webserver eq https
access-list inside_access_in extended permit ip any any
access-list dmz_access_in extended permit ip interface dmz interface outside
pager lines 24
logging enable
logging asdm errors
mtu inside 1500
mtu outside 1500
mtu dmz 1500
ip verify reverse-path interface outside
no failover
icmp unreachable rate-limit 1 burst-size 1
icmp permit any echo-reply outside
icmp permit any time-exceeded outside
icmp permit any unreachable outside
no asdm history enable
arp timeout 14400
no arp permit-nonconnected
nat (dmz,outside) source dynamic any interface
!
object network webserver
 nat (dmz,outside) static interface service tcp https https
!
nat (inside,outside) after-auto source dynamic any interface
access-group inside_access_in in interface inside
access-group outside_access_in in interface outside
access-group dmz_access_in in interface dmz
route outside 0.0.0.0 0.0.0.0 209.87.229.193 1
timeout xlate 3:00:00
timeout pat-xlate 0:00:30
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
timeout tcp-proxy-reassembly 0:01:00
timeout floating-conn 0:00:00
dynamic-access-policy-record DfltAccessPolicy
user-identity default-domain LOCAL
http server enable
http 192.168.1.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
service resetinbound interface outside
service resetoutside
crypto ipsec security-association pmtu-aging infinite
crypto ca trustpool policy
telnet timeout 5
no ssh stricthostkeycheck
ssh timeout 5
ssh key-exchange group dh-group1-sha1
console timeout 0

dhcpd auto_config outside
!
dhcpd address 192.168.1.5-192.168.1.254 inside
dhcpd dns 8.8.8.8 8.8.4.4 interface inside
dhcpd enable inside
!
threat-detection basic-threat
threat-detection statistics
threat-detection statistics tcp-intercept rate-interval 30 burst-rate 400 average-rate 200
!
class-map inspection_default
 match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
 parameters
  message-length maximum client auto
  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
  inspect ip-options
 class class-default
  user-statistics accounting
!
service-policy global_policy global
prompt hostname context
no call-home reporting anonymous
hpm topN enable
Cryptochecksum:8970464f3a2c0417b842b568d7477e6a
: end

 

The syslog keeps showing "TCP access denied by ACL [IP Address] to outside:209.87.229.198/443"

 

I'm sure I'm missing something very basic. Please help!

 

Thanks!

Marc

1 Accepted Solution

Accepted Solutions

your nat is not configured correctly. The dynamic rules always have to be the last ones in the NAT-table:

no nat (dmz,outside) source dynamic any interface
nat (dmz,outside) after-auto source dynamic any interface

View solution in original post

6 Replies 6

your nat is not configured correctly. The dynamic rules always have to be the last ones in the NAT-table:

no nat (dmz,outside) source dynamic any interface
nat (dmz,outside) after-auto source dynamic any interface

Karsten, 

You are AWE! SOME! Thank you so very much! That was it! Feeling pretty dumb right now. I owe you a beer (or whatever your drink of choice is)!

Beer is ok, a good whisky (only lightly peated) even better ... ;-)

And don't feel dumb, unless you made the same mistake many times before. :-)

Next action: Define and configure the DMZ-ACL, as the dmz_access_in doesn't seem to make any sense. A good starting-point is the config-guide.

Happy learning!

Hello, it seems you can help me, I am struggling with my mail server behind DMZ, can you take a look at my configuration? 

Thanks, 

 



interface Ethernet0/0
 switchport access vlan 2
!
interface Ethernet0/1
!
interface Ethernet0/2
 shutdown
!
interface Ethernet0/3
 shutdown
!
interface Ethernet0/4
 shutdown
!
interface Ethernet0/5
 switchport access vlan 3
!
interface Ethernet0/6
 shutdown
!
interface Ethernet0/7
 shutdown
!
interface Vlan1
 nameif inside
 security-level 100
 allow-ssc-mgmt
 ip address 192.168.1.1 255.255.255.0
!
interface Vlan2
 nameif outside
 security-level 0
 ip address 197.254.3.250 255.255.255.248
!
interface Vlan3
 no forward interface Vlan1
 nameif DMZ
 security-level 50
 ip address 10.1.5.254 255.255.255.0
!
dns domain-lookup inside
dns domain-lookup outside
dns domain-lookup DMZ
dns server-group DefaultDNS
 name-server 208.67.222.222
 name-server 208.67.220.220
 domain-name ciscoasa
same-security-traffic permit inter-interface
same-security-traffic permit intra-interface
object network obj_any
 subnet 0.0.0.0 0.0.0.0
object network Office_Network
 subnet 10.1.2.0 255.255.255.0
object network Guests
 subnet 10.1.4.0 255.255.255.0
object network Slot_Network
 subnet 10.10.0.0 255.255.0.0
object network Surveillance
 subnet 10.20.30.0 255.255.255.0
object network Switch_Mgmt
 subnet 10.1.15.0 255.255.255.0
object network Surveillance_Terminals
 range 10.20.30.1 10.20.30.10
object network NETWORK_OBJ_10.1.3.0_24
 subnet 10.1.3.0 255.255.255.0
object network Core_Switch
 host 192.168.1.4
object network ASA_Outside
 host 197.254.3.250
object network ASA_Inside
 subnet 192.168.1.0 255.255.255.0
object network NETWORK_OBJ_192.168.1.0_24
 subnet 192.168.1.0 255.255.255.0
object network NETWORK_OBJ_192.168.12.0_27
 subnet 192.168.12.0 255.255.255.224
object network IakosVPN
 subnet 10.0.0.0 255.255.255.240
object network Iakos_Outside
 host 82.131.211.54
object network Iakos_Allowed
 subnet 10.10.0.0 255.255.0.0
object network IakosVPNpool
 subnet 172.20.12.0 255.255.255.0
object network mailsrv
 host 10.1.5.1
object service POP3
 service tcp destination eq pop3
object service SMTP
 service tcp destination eq smtp
object service mailweb
 service tcp destination eq 3000
object network DMZ-subnet
 subnet 10.1.5.0 255.255.255.0
object network mailserver-EXT
 host 197.254.3.251
object network mailserver-INT
 host 10.1.5.1
object-group network Casino_Allowed
 description Allowed for Internet
 network-object 192.168.1.0 255.255.255.0
 network-object object Guests
 network-object object Office_Network
object-group network Casino
 network-object 192.168.1.0 255.255.255.0
 network-object object Guests
 network-object object Office_Network
 network-object object Slot_Network
 network-object object Switch_Mgmt
 network-object object Surveillance
object-group service udp_passtrough udp
 port-object eq 4500
object-group service torrent tcp
 port-object eq 6881
object-group network Iakos_VPN_Sources
 network-object object IakosVPN
 network-object 172.20.12.0 255.255.255.0
object-group network Iakos_VPN_Allowed
 network-object object Iakos_Allowed
object-group service DM_INLINE_TCP_0 tcp
 port-object eq pop3
 port-object eq smtp
access-list Tunel1_splitTunnelAcl standard permit 192.168.1.0 255.255.255.0
access-list Tunel1_splitTunnelAcl standard permit 10.1.2.0 255.255.255.0
access-list Tunel1_splitTunnelAcl standard permit 10.1.3.0 255.255.255.0
access-list Tunel1_splitTunnelAcl standard permit 10.1.4.0 255.255.255.0
access-list Tunel1_splitTunnelAcl standard permit 10.1.15.0 255.255.255.0
access-list Tunel1_splitTunnelAcl standard permit 10.10.0.0 255.255.0.0
access-list inside_access_in extended permit ip object-group Casino_Allowed any
access-list inside_access_in extended permit ip object-group Iakos_VPN_Allowed object-group Iakos_VPN_Sources
access-list outside_mpc extended permit ip any any
access-list global_mpc extended permit ip any any
access-list s-tunnel_splitTunnelAcl standard permit 10.1.3.0 255.255.255.0
access-list outside_cryptomap extended permit ip object-group Iakos_VPN_Allowed object-group Iakos_VPN_Sources
access-list k-tunnel_splitTunnelAcl standard permit 192.168.1.0 255.255.255.0
access-list outside_access extended permit tcp any object mailsrv object-group DM_INLINE_TCP_0
access-list inbound extended permit tcp any object mailserver-INT eq pop3
access-list inbound extended permit tcp any object mailserver-INT eq smtp
pager lines 24
logging enable
logging monitor warnings
logging asdm informational
mtu inside 1500
mtu outside 1500
mtu DMZ 1500
ip local pool VPN_Pool 192.168.12.1-192.168.12.25 mask 255.255.255.0
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
nat (inside,outside) source static any any destination static NETWORK_OBJ_192.168.12.0_27 NETWORK_OBJ_192.168.12.0_27 no-proxy-arp route-lookup
nat (inside,outside) source dynamic Casino_Allowed interface
nat (inside,any) source static Iakos_VPN_Allowed Iakos_VPN_Allowed destination static Iakos_VPN_Sources Iakos_VPN_Sources no-proxy-arp
!
object network DMZ-subnet
 nat (DMZ,outside) dynamic interface
object network mailserver-INT
 nat (DMZ,outside) static mailserver-EXT
!
nat (DMZ,outside) after-auto source dynamic any interface
access-group inside_access_in in interface inside
access-group inbound in interface outside
!
router eigrp 100
 network 192.168.1.0 255.255.255.0
!
route outside 0.0.0.0 0.0.0.0 197.254.3.249 1

+ drinks of your choice :D

First: It's always best to open a new thread for a new problem. Especially if you are not the thread-starter.

Then: Your NAT is really a mess. Rethink what you want to achieve and rewrite it completey. Follow the rule that you:

  • configure object-NAT for your server-publishing as you need it for your mailserver (and how you have done it)
  • place the dynamic rules for outgoing traffic in section 3 and only in section 3. Thats done with the after-auto keyword as you also do it for the DMZ->outside NAT.
  • Place all NAT-exemtion for VPN and other communication if needed into section 1.
  • Be specific and don't use the any-keyword if you don't have to.

And just to notice it: My drink of choice for today will be couple of Coronas at the CAE of the CiscoLive in an hour or so. ;-)

But: Don't drink and configure ...

Review Cisco Networking for a $25 gift card