• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1972
  • Last Modified:

Cisco ASA 5505 DMZ Server to inside SQL Server

On an ASA5505 with the Security Plus License installed we need for the Server in the DMZ to be able to query a SQL Server on the inside. Each time we try to add a rule to allow the connection some other aspect of the configuration is affected.

At this time everything is working as desired except for the DMZ to SQL server communication.

The following configuration was built using the ASDM with only a few changes made from the command line.

Result of the command: "show running-config"

: Saved
:
ASA Version 7.2(2)
!
hostname asa5505
domain-name mydomain.local
enable password (password) encrypted
names
name 192.168.0.10 dmzsvr
name 10.0.0.2 mailsvr
name 10.0.0.21 sqlsvr
!
interface Vlan1
 nameif inside
 security-level 100
 ip address 10.0.0.254 255.0.0.0
!
interface Vlan2
 nameif outside
 security-level 0
 ip address XX.XX.XX.85 255.255.255.248
!
interface Vlan3
 nameif dmz
 security-level 50
 ip address 192.168.0.1 255.255.255.0
!
interface Ethernet0/0
 switchport access vlan 2
!
interface Ethernet0/1
 switchport access vlan 3
!
interface Ethernet0/2
!
interface Ethernet0/3
!
interface Ethernet0/4
!
interface Ethernet0/5
!
interface Ethernet0/6
!
interface Ethernet0/7
!
passwd (password) encrypted
ftp mode passive
clock timezone EST -5
clock summer-time EDT recurring
dns server-group DefaultDNS
 domain-name mydomain.local
same-security-traffic permit intra-interface
access-list outside_access_in extended permit tcp any host XX.XX.XX.83 eq www
access-list outside_access_in extended permit tcp any interface outside eq www
access-list outside_access_in extended permit tcp any interface outside eq smtp
access-list outside_access_in extended permit tcp any interface outside eq pop3
access-list outside_access_in extended permit tcp any interface outside eq https  
access-list Remote1_splitTunnelAcl standard permit 10.0.0.0 255.0.0.0
access-list inside_nat0_outbound extended permit ip 10.0.0.0 255.0.0.0 10.0.1.0 255.255.255.0
pager lines 24
logging enable
logging asdm informational
mtu inside 1500
mtu outside 1500
mtu dmz 1500
ip local pool RemotePool2 10.0.1.120-10.0.1.130 mask 255.0.0.0
no failover
monitor-interface inside
monitor-interface outside
monitor-interface dmz
icmp unreachable rate-limit 1 burst-size 1
icmp permit any inside
icmp permit any outside
asdm image disk0:/asdm-522.bin
no asdm history enable
arp timeout 14400
global (inside) 1 10.0.0.131-10.0.0.135 netmask 255.0.0.0
global (outside) 1 interface
global (dmz) 1 192.168.0.20-192.168.0.30 netmask 255.255.255.0
nat (inside) 0 access-list inside_nat0_outbound
nat (inside) 1 10.0.0.0 255.0.0.0
nat (inside) 1 0.0.0.0 0.0.0.0
static (inside,outside) tcp interface smtp mailsvr smtp netmask 255.255.255.255
static (inside,outside) tcp interface pop3 mailsvr pop3 netmask 255.255.255.255
static (inside,outside) tcp interface www mailsvr www netmask 255.255.255.255
static (inside,outside) tcp interface https mailsvr https netmask 255.255.255.255  
static (inside,dmz) tcp interface 1433 sqlsvr 1433 netmask 255.255.255.255
static (dmz,outside) XX.XX.XX.83 dmzsvr netmask 255.255.255.255
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 XX.XX.XX.86 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 uauth 0:05:00 absolute
group-policy Remote1 internal
group-policy Remote1 attributes
 vpn-tunnel-protocol IPSec
 split-tunnel-policy tunnelspecified
 split-tunnel-network-list value Remote1_splitTunnelAcl
 default-domain value mydomain.local
username vpnuser2 password (password) encrypted
username vpnuser1 password (password) encrypted privilege 15
http server enable
http 10.0.0.0 255.0.0.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto dynamic-map outside_dyn_map 20 set pfs
crypto dynamic-map outside_dyn_map 20 set transform-set ESP-3DES-SHA
crypto dynamic-map outside_dyn_map 40 set pfs
crypto dynamic-map outside_dyn_map 40 set transform-set ESP-3DES-SHA
crypto map outside_map 65535 ipsec-isakmp dynamic outside_dyn_map
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
tunnel-group Remote1 type ipsec-ra
tunnel-group Remote1 general-attributes
 address-pool RemotePool2
 default-group-policy Remote1
tunnel-group Remote1 ipsec-attributes
 pre-shared-key *
telnet timeout 5
ssh timeout 5
console timeout 0

!
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
Corinnia
Asked:
Corinnia
  • 2
  • 2
1 Solution
 
Darkstriker69Commented:
I think it would be something like

access-list inside_nat0_outbound extended permit ip 10.0.0.0 255.0.0.0 192.168.0.0 255.255.255.0
access-list dmz_access_in extended permit ip dmzsvr 255.255.255.255 sqlsvr 255.255.255.255
access-group dmz_access_in in interface dmz

Doing it from memory so hopefully its right

Darkstriker69
0
 
theeterCommented:
static (inside,dmz) 10.0.0.0 10.0.0.0 netmask 255.0.0.0

access-list dmz permit tcp host 192.168.0.10 host 10.0.0.21 eq 1433
access-list dmz deny ip any 10.0.0.0 255.0.0.0
access-list dmz permit ip any any
access-group dmz in interface dmz
0
 
CorinniaAuthor Commented:
We tried Darkstriker69's suggestion today and could not get to the sqlsvr. Also had the same problem that we had run into before in that the dmzsvr could no longer access the web. When looking at the configuration with the ASDM the Default Permit rule to Any Less Secure Network had been replaced.

Will try theeter's suggestion tomorrow. Thank you.
0
 
CorinniaAuthor Commented:
Sorry for the delayed response, had a problem with VPN. Everything now works just as we wish.

Thank you theeter.

Here is a copy of the current configuration:

Result of the command: "show running-config"

: Saved
:
ASA Version 7.2(2)
!
hostname asa5505
domain-name mydomain.local
enable password (password) encrypted
names
name 192.168.0.10 dmzsvr
name 10.0.0.2 mailsvr
name 10.0.0.21 sqlsvr
!
interface Vlan1
 nameif inside
 security-level 100
 ip address 10.0.0.254 255.0.0.0
!
interface Vlan2
 nameif outside
 security-level 0
 ip address XX.XX.XX.85 255.255.255.248
!
interface Vlan3
 nameif dmz
 security-level 50
 ip address 192.168.0.1 255.255.255.0
!
interface Ethernet0/0
 switchport access vlan 2
!
interface Ethernet0/1
 switchport access vlan 3
!
interface Ethernet0/2
!
interface Ethernet0/3
!
interface Ethernet0/4
!
interface Ethernet0/5
!
interface Ethernet0/6
!
interface Ethernet0/7
!
passwd (password) encrypted
ftp mode passive
clock timezone EST -5
clock summer-time EDT recurring
dns server-group DefaultDNS
 domain-name mydomain.local
same-security-traffic permit intra-interface
access-list outside_access_in extended permit tcp any host XX.XX.XX.83 eq www
access-list outside_access_in extended permit tcp any interface outside eq www
access-list outside_access_in extended permit tcp any interface outside eq smtp
access-list outside_access_in extended permit tcp any interface outside eq pop3
access-list outside_access_in extended permit tcp any interface outside eq https  
access-list Remote1_splitTunnelAcl standard permit any
access-list inside_nat0_outbound extended permit ip any 10.0.1.0 255.255.255.0
access-list dmz extended permit tcp host dmzsvr host sqlsvr eq 1433
access-list dmz extended permit ip any any
access-list dmz extended deny ip any 10.0.0.0 255.0.0.0
pager lines 24
logging enable
logging asdm informational
mtu inside 1500
mtu outside 1500
mtu dmz 1500
ip local pool RemotePool2 10.0.1.120-10.0.1.130 mask 255.0.0.0
no failover
monitor-interface inside
monitor-interface outside
monitor-interface dmz
icmp unreachable rate-limit 1 burst-size 1
icmp permit any inside
icmp permit any outside
asdm image disk0:/asdm-522.bin
no asdm history enable
arp timeout 14400
global (inside) 1 10.0.0.131-10.0.0.135 netmask 255.0.0.0
global (outside) 1 interface
global (dmz) 1 192.168.0.20-192.168.0.30 netmask 255.255.255.0
nat (inside) 0 access-list inside_nat0_outbound
nat (inside) 1 10.0.0.0 255.0.0.0
nat (inside) 1 0.0.0.0 0.0.0.0
static (inside,outside) tcp interface smtp mailsvr smtp netmask 255.255.255.255
static (inside,outside) tcp interface pop3 mailsvr pop3 netmask 255.255.255.255
static (inside,outside) tcp interface www mailsvr www netmask 255.255.255.255
static (inside,outside) tcp interface https mailsvr https netmask 255.255.255.255  
static (dmz,outside) XX.XX.XX.83 dmzsvr netmask 255.255.255.255
static (inside,dmz) 10.0.0.0 10.0.0.0 netmask 255.0.0.0
access-group outside_access_in in interface outside
access-group dmz in interface dmz
route outside 0.0.0.0 0.0.0.0 XX.XX.XX.86 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 uauth 0:05:00 absolute
group-policy Remote1 internal
group-policy Remote1 attributes
 wins-server value 10.0.0.2
 dns-server value 10.0.0.2
 vpn-tunnel-protocol IPSec
 split-tunnel-policy tunnelspecified
 split-tunnel-network-list value Remote1_splitTunnelAcl
 default-domain value mydomain.local
username vpnuser2 password (password) encrypted
username vpnuser1 password (password) encrypted privilege 15
http server enable
http 10.0.0.0 255.0.0.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto dynamic-map outside_dyn_map 20 set pfs
crypto dynamic-map outside_dyn_map 20 set transform-set ESP-3DES-SHA
crypto map outside_map 65535 ipsec-isakmp dynamic outside_dyn_map
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
tunnel-group Remote1 type ipsec-ra
tunnel-group Remote1 general-attributes
 address-pool RemotePool2
 default-group-policy Remote1
tunnel-group Remote1 ipsec-attributes
 pre-shared-key *
telnet timeout 5
ssh timeout 5
console timeout 0

!
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
 
theeterCommented:
You made a little mistake. There are two lines in this acl which are flip flopped. You want the "deny" line before the "permit ip any any"

access-list dmz extended permit tcp host dmzsvr host sqlsvr eq 1433
access-list dmz extended permit ip any any
access-list dmz extended deny ip any 10.0.0.0 255.0.0.0

Should be...

access-list dmz extended permit tcp host dmzsvr host sqlsvr eq 1433
access-list dmz extended deny ip any 10.0.0.0 255.0.0.0
access-list dmz extended permit ip any any

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now