zlajoie
asked on
Nameserver lookups from DMZ issue
I am having an issue that I can't seem to figure out with my Pix 515e, mostly because my lack of knowledge with the PIX.
The web server in our DMZ can ping outside IP addresses, but when you try to do a nslookup, it times out trying to access a DNS server. I'm testing external DNS using 208.67.222.222. When I look at the output logs, there are no errors. It says: Built outbound UDP connection 94067467 for Outside:208.67.222.222/53 (208.67.222.222/53) to DMZ:172.16.10.2/4681 (xxx.xxx.149.54/4681), it shows several lines of this, but on the server, the names are never resolved.
I didn't want to point the DNS to my internal network because I had security concerns doing that. I'm posting part of my config for the experts to look at. Feel free to comment on any other mistakes I have made.
PIX Version 7.2(1)19
!
hostname pixfirewall
domain-name hostname
enable password xxx encrypted
names
!
interface Ethernet0
description Outside Interface
nameif Outside
security-level 0
ip address xxx.xxx.149.2 255.255.255.0
ospf cost 10
!
interface Ethernet1
description Inside Interface
nameif inside
security-level 100
ip address 172.16.11.1 255.255.255.0
ospf cost 10
!
interface Ethernet2
description DMZ Interface
nameif DMZ
security-level 30
ip address 172.16.10.1 255.255.255.0
ospf cost 10
!
interface Ethernet3
shutdown
no nameif
no security-level
no ip address
!
interface Ethernet4
shutdown
no nameif
no security-level
no ip address
!
interface Ethernet5
shutdown
no nameif
no security-level
no ip address
!
ftp mode passive
clock timezone CST -6
clock summer-time CDT recurring
dns domain-lookup inside
dns server-group DefaultDNS
name-server 10.100.0.110
name-server 10.100.5.15
domain-name hostname
access-list outbound extended permit icmp host 10.100.1.5 any
access-list outbound extended permit udp host 10.100.1.5 any
access-list outbound extended permit tcp host 10.100.1.5 any
access-list outbound extended permit icmp any any
access-list outbound extended permit icmp host 10.100.1.110 any
access-list outbound extended permit tcp host 10.100.7.245 any eq www
access-list outbound extended permit tcp host 10.100.0.35 any
access-list outbound extended permit tcp host 10.100.0.34 any
access-list outbound extended permit udp host 10.100.0.34 any eq domain
access-list outbound extended permit tcp host 10.100.0.33 any
access-list outbound extended permit tcp host 10.100.3.205 any
access-list outbound extended permit tcp host 10.100.3.206 any
access-list outbound extended permit udp host 10.100.3.205 any eq domain
access-list outbound remark Domain
access-list outbound extended permit udp host 10.100.3.206 any eq domain
access-list outbound extended permit tcp 10.100.0.0 255.255.0.0 172.16.10.0 255.255.255.0 eq www
access-list outbound extended permit tcp 10.100.0.0 255.255.0.0 172.16.10.0 255.255.255.0 eq 5900
access-list inbound extended permit icmp any any
access-list inbound extended permit tcp any host xxx.xxx.149.52 eq www
access-list inbound extended permit tcp any host xxx.xxx.149.35 eq www
access-list inbound extended permit tcp any host xxx.xxx.149.53 eq www
access-list inbound extended permit tcp any host xxx.xxx.149.18 eq https
access-list inbound extended permit tcp any host xxx.xxx.149.30 eq www
access-list inbound extended permit tcp any host xxx.xxx.149.31 eq www
access-list inbound extended permit tcp any host xxx.xxx.149.31 eq https
access-list inbound extended deny tcp any host xxx.xxx.149.30 eq 5900
access-list inbound extended permit tcp any host xxx.xxx.149.16 eq domain
access-list inbound extended permit udp any host xxx.xxx.149.16 eq domain
access-list inbound extended permit tcp any host xxx.xxx.149.16 eq smtp
access-list inbound extended permit tcp any host xxx.xxx.149.16 eq 4443
access-list inbound extended permit tcp any host xxx.xxx.149.16 eq 995
access-list inbound extended permit tcp any host xxx.xxx.149.10 eq domain
access-list inbound extended permit udp any host xxx.xxx.149.10 eq domain
access-list inbound extended permit udp any eq domain host xxx.xxx.149.16 gt 1023
access-list inbound extended permit udp any eq domain host xxx.xxx.149.10 gt 1023
access-list inbound extended permit udp any eq domain host xxx.xxx.149.18 gt 1023
access-list inbound extended permit tcp any host xxx.xxx.149.54 eq www
access-list inbound extended permit tcp any host xxx.xxx.149.54 eq https
access-list dmz extended permit tcp 172.16.10.0 255.255.255.0 any eq https
access-list dmz extended permit tcp 172.16.10.0 255.255.255.0 any eq www
access-list dmz extended permit udp 172.16.10.0 255.255.255.0 any
access-list dmz extended permit tcp 172.16.10.0 255.255.255.0 any eq domain
access-list dmz extended permit udp 172.16.10.0 255.255.255.0 any eq domain
access-list dmz extended permit udp 172.16.10.0 255.255.255.0 any gt 1023
access-list dmz extended permit icmp 172.16.10.0 255.255.255.0 any
access-list inside_nat0_outbound extended permit ip 10.100.0.0 255.255.0.0 172.16.12.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip 10.100.0.0 255.255.0.0 172.16.12.32 255.255.255.248
access-list inside_nat0_outbound extended permit ip 192.168.35.88 255.255.255.248 172.22.12.0 255.255.255.0
access-list Local_Lan_Access standard permit 10.100.0.0 255.255.0.0
mtu Outside 1500
mtu inside 1500
mtu DMZ 1500
no failover
asdm image flash:/asdm-521.bin
no asdm history enable
arp timeout 14400
nat-control
global (Outside) 1 xxx.xxx.149.50 netmask 255.255.255.0
nat (inside) 0 access-list inside_nat0_outbound
nat (inside) 1 0.0.0.0 0.0.0.0
static (inside,Outside) xxx.xxx.149.35 10.100.0.250 netmask 255.255.255.255
static (inside,Outside) xxx.xxx.149.52 10.100.7.245 netmask 255.255.255.255
static (inside,Outside) xxx.xxx.149.18 10.100.0.34 netmask 255.255.255.255
static (inside,Outside) xxx.xxx.149.30 10.100.1.205 netmask 255.255.255.255
static (inside,Outside) xxx.xxx.149.16 10.100.3.205 netmask 255.255.255.255
static (inside,Outside) xxx.xxx.149.10 10.100.3.206 netmask 255.255.255.255
static (inside,Outside) xxx.xxx.149.31 10.100.1.5 netmask 255.255.255.255
static (inside,Outside) xxx.xxx.35.89 10.100.0.239 netmask 255.255.255.255 //Site to Site VPN
static (DMZ,Outside) xxx.xxx.149.54 172.16.10.2 netmask 255.255.255.255
static (inside,DMZ) 10.100.0.0 10.100.0.0 netmask 255.255.0.0
access-group inbound in interface Outside
access-group outbound in interface inside
access-group dmz in interface DMZ
route Outside 0.0.0.0 0.0.0.0 xxx.xxx.149.1 1
route inside 10.100.0.0 255.255.0.0 172.16.11.2 1
route inside 10.201.0.0 255.255.0.0 172.16.11.2 1
!
router rip
network 10.0.0.0
!
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
http server enable
http 172.16.11.0 255.255.255.0 inside
http 10.100.0.0 255.255.0.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
telnet timeout 5
ssh 10.100.3.240 255.255.255.255 inside
ssh 172.16.11.245 255.255.255.255 inside
ssh 10.100.7.245 255.255.255.255 inside
ssh 10.100.1.25 255.255.255.255 inside
ssh timeout 30
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 sqlnet
inspect skinny
inspect sunrpc
inspect xdmcp
inspect sip
inspect netbios
inspect tftp
inspect pptp
!
service-policy global_policy global
ntp server 10.100.0.110 source inside prefer
smtp-server 10.100.1.5
prompt hostname context
The web server in our DMZ can ping outside IP addresses, but when you try to do a nslookup, it times out trying to access a DNS server. I'm testing external DNS using 208.67.222.222. When I look at the output logs, there are no errors. It says: Built outbound UDP connection 94067467 for Outside:208.67.222.222/53 (208.67.222.222/53) to DMZ:172.16.10.2/4681 (xxx.xxx.149.54/4681), it shows several lines of this, but on the server, the names are never resolved.
I didn't want to point the DNS to my internal network because I had security concerns doing that. I'm posting part of my config for the experts to look at. Feel free to comment on any other mistakes I have made.
PIX Version 7.2(1)19
!
hostname pixfirewall
domain-name hostname
enable password xxx encrypted
names
!
interface Ethernet0
description Outside Interface
nameif Outside
security-level 0
ip address xxx.xxx.149.2 255.255.255.0
ospf cost 10
!
interface Ethernet1
description Inside Interface
nameif inside
security-level 100
ip address 172.16.11.1 255.255.255.0
ospf cost 10
!
interface Ethernet2
description DMZ Interface
nameif DMZ
security-level 30
ip address 172.16.10.1 255.255.255.0
ospf cost 10
!
interface Ethernet3
shutdown
no nameif
no security-level
no ip address
!
interface Ethernet4
shutdown
no nameif
no security-level
no ip address
!
interface Ethernet5
shutdown
no nameif
no security-level
no ip address
!
ftp mode passive
clock timezone CST -6
clock summer-time CDT recurring
dns domain-lookup inside
dns server-group DefaultDNS
name-server 10.100.0.110
name-server 10.100.5.15
domain-name hostname
access-list outbound extended permit icmp host 10.100.1.5 any
access-list outbound extended permit udp host 10.100.1.5 any
access-list outbound extended permit tcp host 10.100.1.5 any
access-list outbound extended permit icmp any any
access-list outbound extended permit icmp host 10.100.1.110 any
access-list outbound extended permit tcp host 10.100.7.245 any eq www
access-list outbound extended permit tcp host 10.100.0.35 any
access-list outbound extended permit tcp host 10.100.0.34 any
access-list outbound extended permit udp host 10.100.0.34 any eq domain
access-list outbound extended permit tcp host 10.100.0.33 any
access-list outbound extended permit tcp host 10.100.3.205 any
access-list outbound extended permit tcp host 10.100.3.206 any
access-list outbound extended permit udp host 10.100.3.205 any eq domain
access-list outbound remark Domain
access-list outbound extended permit udp host 10.100.3.206 any eq domain
access-list outbound extended permit tcp 10.100.0.0 255.255.0.0 172.16.10.0 255.255.255.0 eq www
access-list outbound extended permit tcp 10.100.0.0 255.255.0.0 172.16.10.0 255.255.255.0 eq 5900
access-list inbound extended permit icmp any any
access-list inbound extended permit tcp any host xxx.xxx.149.52 eq www
access-list inbound extended permit tcp any host xxx.xxx.149.35 eq www
access-list inbound extended permit tcp any host xxx.xxx.149.53 eq www
access-list inbound extended permit tcp any host xxx.xxx.149.18 eq https
access-list inbound extended permit tcp any host xxx.xxx.149.30 eq www
access-list inbound extended permit tcp any host xxx.xxx.149.31 eq www
access-list inbound extended permit tcp any host xxx.xxx.149.31 eq https
access-list inbound extended deny tcp any host xxx.xxx.149.30 eq 5900
access-list inbound extended permit tcp any host xxx.xxx.149.16 eq domain
access-list inbound extended permit udp any host xxx.xxx.149.16 eq domain
access-list inbound extended permit tcp any host xxx.xxx.149.16 eq smtp
access-list inbound extended permit tcp any host xxx.xxx.149.16 eq 4443
access-list inbound extended permit tcp any host xxx.xxx.149.16 eq 995
access-list inbound extended permit tcp any host xxx.xxx.149.10 eq domain
access-list inbound extended permit udp any host xxx.xxx.149.10 eq domain
access-list inbound extended permit udp any eq domain host xxx.xxx.149.16 gt 1023
access-list inbound extended permit udp any eq domain host xxx.xxx.149.10 gt 1023
access-list inbound extended permit udp any eq domain host xxx.xxx.149.18 gt 1023
access-list inbound extended permit tcp any host xxx.xxx.149.54 eq www
access-list inbound extended permit tcp any host xxx.xxx.149.54 eq https
access-list dmz extended permit tcp 172.16.10.0 255.255.255.0 any eq https
access-list dmz extended permit tcp 172.16.10.0 255.255.255.0 any eq www
access-list dmz extended permit udp 172.16.10.0 255.255.255.0 any
access-list dmz extended permit tcp 172.16.10.0 255.255.255.0 any eq domain
access-list dmz extended permit udp 172.16.10.0 255.255.255.0 any eq domain
access-list dmz extended permit udp 172.16.10.0 255.255.255.0 any gt 1023
access-list dmz extended permit icmp 172.16.10.0 255.255.255.0 any
access-list inside_nat0_outbound extended permit ip 10.100.0.0 255.255.0.0 172.16.12.0 255.255.255.0
access-list inside_nat0_outbound extended permit ip 10.100.0.0 255.255.0.0 172.16.12.32 255.255.255.248
access-list inside_nat0_outbound extended permit ip 192.168.35.88 255.255.255.248 172.22.12.0 255.255.255.0
access-list Local_Lan_Access standard permit 10.100.0.0 255.255.0.0
mtu Outside 1500
mtu inside 1500
mtu DMZ 1500
no failover
asdm image flash:/asdm-521.bin
no asdm history enable
arp timeout 14400
nat-control
global (Outside) 1 xxx.xxx.149.50 netmask 255.255.255.0
nat (inside) 0 access-list inside_nat0_outbound
nat (inside) 1 0.0.0.0 0.0.0.0
static (inside,Outside) xxx.xxx.149.35 10.100.0.250 netmask 255.255.255.255
static (inside,Outside) xxx.xxx.149.52 10.100.7.245 netmask 255.255.255.255
static (inside,Outside) xxx.xxx.149.18 10.100.0.34 netmask 255.255.255.255
static (inside,Outside) xxx.xxx.149.30 10.100.1.205 netmask 255.255.255.255
static (inside,Outside) xxx.xxx.149.16 10.100.3.205 netmask 255.255.255.255
static (inside,Outside) xxx.xxx.149.10 10.100.3.206 netmask 255.255.255.255
static (inside,Outside) xxx.xxx.149.31 10.100.1.5 netmask 255.255.255.255
static (inside,Outside) xxx.xxx.35.89 10.100.0.239 netmask 255.255.255.255 //Site to Site VPN
static (DMZ,Outside) xxx.xxx.149.54 172.16.10.2 netmask 255.255.255.255
static (inside,DMZ) 10.100.0.0 10.100.0.0 netmask 255.255.0.0
access-group inbound in interface Outside
access-group outbound in interface inside
access-group dmz in interface DMZ
route Outside 0.0.0.0 0.0.0.0 xxx.xxx.149.1 1
route inside 10.100.0.0 255.255.0.0 172.16.11.2 1
route inside 10.201.0.0 255.255.0.0 172.16.11.2 1
!
router rip
network 10.0.0.0
!
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
http server enable
http 172.16.11.0 255.255.255.0 inside
http 10.100.0.0 255.255.0.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
telnet timeout 5
ssh 10.100.3.240 255.255.255.255 inside
ssh 172.16.11.245 255.255.255.255 inside
ssh 10.100.7.245 255.255.255.255 inside
ssh 10.100.1.25 255.255.255.255 inside
ssh timeout 30
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 sqlnet
inspect skinny
inspect sunrpc
inspect xdmcp
inspect sip
inspect netbios
inspect tftp
inspect pptp
!
service-policy global_policy global
ntp server 10.100.0.110 source inside prefer
smtp-server 10.100.1.5
prompt hostname context
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Sorry to take so long getting back to this. It was an issue with our nat and we cleaned up our config based on your suggestions. Thank you for helping me with this.
access-list outbound extended permit icmp host 10.100.1.5 any
access-list outbound extended permit icmp any any
access-list outbound extended permit icmp host 10.100.1.110 any
And again:
access-list dmz extended permit udp 172.16.10.0 255.255.255.0 any
access-list dmz extended permit udp 172.16.10.0 255.255.255.0 any eq domain
access-list dmz extended permit udp 172.16.10.0 255.255.255.0 any gt 1023
If I just look at the dmz part, only the first of those 3 rules can ever be used. If you really NEED complete UDP access, you should just delete the others. But more likely you should specify what it is that you need.
Even worse, there is a security issue in your general dmz access. When you use ANY as destination for access-rules in dmz, it's usually done becuz you must be able to access all of the Internet. But in what you have made, you have also granted full access to the inside network (for the protocols in question).
You should restructure your DMZ access into these 3 parts:
grant specific access to inside as needed
block all other access to inside
Now open for any destinations to the protocols you generally need for Internet
Example:
obj net Inside-Nets
net 172.16.11.0 255.255.255.0
net 10.100.0.0 255.255.0.0
net 10.201.0.0 255.255.0.0
exit
access-list dmz permit tcp host <ip of mailscanner> host <inside mailhost> eq 25
access-list dmz deny ip any obj Inside-Nets
access-list dmz permit tcp 172.16.10.0 255.255.255.0 any eq 80
access-list dmz permit tcp 172.16.10.0 255.255.255.0 any eq 443
(Of cuz I don't know what kinda of access you NEED from dmz to inside)