11-18-2015 02:13 AM
Hi
We have a CISCO ASA 5505, and recently setup a smal web server on the inside interface. I've added a NAT rule for port 80 to the internal server, and everything works great from the outside/internet. Now when I from the inside try to access the server by the domain name or the external IP this does not work as the router cannot loop back to it self.
I tried to follow the guides of using DNS doctoring: http://www.cisco.com/c/en/us/support/docs/security/asa-5500-x-series-next-generation-firewalls/72273-dns-doctoring-3zones.html
But either the "Translate DNS replies that match this rule" is disabled or I get an error that the external IP is already used for the interface outside.
For simplicity the internal server web server has address 192.168.0.2 and the external ip is 80.90.100.110
THe attached photo is the configuration where I get an error that the IP address is in use by the outside interface. I hope someone can help me how to configure this?
Best regards
Hans Milling...
11-18-2015 03:54 AM
Hello Hans,
Based on the information you provided, it's really hard to detect what could be wrong in the configuration. It would be more helpful if you can paste your ACL and NAT configuration.
I assume that you only have two zones, inside and outside. The link which you used describes DNS Doctoring with three NAT interfaces. Maybe the following link helps you better:
http://www.cisco.com/c/en/us/support/docs/security/asa-5500-x-series-next-generation-firewalls/71704-dns-doctoring-2zones.html#backinfo
Regards,
Mohammad Moghaddas
11-18-2015 04:38 AM
What command can I use to output the ACL and NAT configuration, or can screen shots do the trick?
11-18-2015 05:07 AM
Well, if you have no sensitive information, you can attach the output of sh run
11-18-2015 06:14 AM
Will this do? I stripped the output from sensitive information (I hope so).
: Saved
:
ASA Version 8.4(3)
!
hostname gateway
enable password xxxxxxxxxxxxxxxx encrypted
passwd xxxxxxxxxxxxxxxx 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
!
interface Vlan1
description Internal network
nameif inside
security-level 100
ip address 192.168.1.1 255.255.255.0
!
interface Vlan2
description Internet
nameif outside
security-level 0
ip address 80.90.100.110 255.255.255.0
!
ftp mode passive
dns domain-lookup inside
dns domain-lookup outside
dns server-group DefaultDNS
name-server 208.67.222.222
name-server 208.67.220.220
name-server 8.8.8.8
name-server 8.8.4.4
object network obj_any
subnet 0.0.0.0 0.0.0.0
object network NETWORK_OBJ_192.168.1.0_24
subnet 192.168.1.0 255.255.255.0
object-group protocol TCPUDP
protocol-object udp
protocol-object tcp
access-list outside_access_in extended permit tcp any object NETWORK_OBJ_192.168.1.0_24 eq ftp
access-list outside_access_in remark Access to http på www.company.com
access-list outside_access_in extended permit object-group TCPUDP any object NETWORK_OBJ_192.168.1.0_24 eq www
access-list inside_access_in extended permit gre any any
access-list inside_access_in extended permit tcp any eq pptp any
access-list inside_access_in extended permit ip any any
access-list inside_access_in extended permit udp any any
access-list inside_access_in extended permit esp any any
access-list Split_Tunnel_List remark Netværket inden for firewallen.
access-list Split_Tunnel_List standard permit 192.168.1.0 255.255.255.0
access-list outside extended permit tcp any host 80.90.100.110
pager lines 24
logging enable
logging asdm informational
mtu inside 1500
mtu outside 1500
ip local pool Company 192.168.1.100-192.168.1.131 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.1.0_24 NETWORK_OBJ_192.168.1.0_24 no-proxy-arp route-lookup
!
object network obj_any
nat (inside,outside) dynamic interface
object network FTPServer
nat (inside,outside) static interface service tcp ftp ftp
object network web2000
nat (inside,outside) static interface service tcp www www
access-group inside_access_in in interface inside
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 80.90.100.110 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
snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
telnet timeout 5
ssh timeout 5
console timeout 0
dhcpd auto_config outside
!
dhcpd address 192.168.1.100-192.168.1.131 inside
dhcpd dns 208.67.222.222 208.67.220.220 interface inside
dhcpd enable inside
!
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
inspect pptp
!
service-policy global_policy global
prompt hostname context
call-home reporting anonymous
Cryptochecksum:32b60bea45d745714f30b3ee70baed79
: end
Best regards Hans Milling...
11-28-2015 03:29 AM
Apparently you have some excessive configuratio here. Let's try the below confguration on CLI, which is removing the excess part and adding a Satit NAT (you can modify it later with your required services):
no nat (inside,outside) source static any any destination static NETWORK_OBJ_192.168.1.0_24 NETWORK_OBJ_192.168.1.0_24 no-proxy-arp route-lookup
!
no object network FTPServer
no object network web2000
!
nat (inside,outside) source static 192.168.0.2 80.90.100.110 dns
!
policy-map global_policy
class inspection_default
inspect dns
The dns keyword at the end of NAT statement, is the key to DNS Doctoring.
Regards,
Mohammad Moghaddas
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide