为什么我无法 ping 防火墙后面的主机? Cisco asa 5505

为什么我无法 ping 防火墙后面的主机? Cisco asa 5505

有人能帮我弄清楚,我的 Cisco asa 5505 配置中哪里出错或缺失了吗?我的防火墙后面有多个主机。这些主机在端口 80 上运行不同的网站。我可以从一台服务器 ping 到另一台服务器,但我无法从互联网 ping 服务器。我使用的是静态 NAT。这里是否存在转换问题?

========
CISCOASACLOUD# show run
CISCOASACLOUD# show running-config
: Saved
:
ASA Version 9.0(1)
!
hostname CISCOASACLOUD
enable password ************* encrypted
passwd ************* encrypted
names
ip local pool VPN_IP_POOL 10.0.2.50-10.0.2.75 mask 255.255.255.0
!
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
 nameif inside
 security-level 100
 ip address 10.0.2.254 255.255.255.0
!
interface Vlan2
 nameif outside
 security-level 0
 ip address 82.94.XX.XX 255.255.255.0
!
ftp mode passive
clock timezone CEST 1
clock summer-time CEDT recurring last Sun Mar 2:00 last Sun Oct 3:00
dns domain-lookup inside
dns domain-lookup outside
dns server-group DefaultDNS
 name-server 194.109.104.104
 name-server 194.109.9.99
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 VPN_NETWORK
 subnet 10.0.2.0 255.255.255.0
object network NETWORK_OBJ_10.0.2.0_24
 subnet 10.0.2.0 255.255.255.0
object network NETWORK_OBJ_10.0.2.0_25
 subnet 10.0.2.0 255.255.255.128
object network SERVER2003_HTTP
 host 10.0.2.104
object network SERVER2003_HTTPS
 host 10.0.2.104
object network SERVER2004_HTTP
 host 10.0.2.105
object network SERVER2004_HTTPS
 host 10.0.2.105
object network SERVER2002_HTTP
 host 10.0.2.103
object network SERVER2002_HTTPS
 host 10.0.2.103
object network SERVER2002_NAGIOS
 host 10.0.2.103
object network SERVER2003_NAGIOS
 host 10.0.2.104
object network SERVER2002_NAGIOS_NSCP
 host 10.0.2.103
object network SERVER2003_NAGIOS_NSCP
 host 10.0.2.104
object network SERVER2004_NAGIOS
 host 10.0.2.105
object network SERVER3001_NAGIOS
 host 10.0.2.202
object network SERVER2001_NAGIOS
 host 10.0.2.102
object network SERVER3001_HTTP
 host 10.0.2.202
object network SERVER3001_HTTPS
 host 10.0.2.202
object network SERVER2004_FTP
 host 10.0.2.105
object network SERVER2004_FTP_TCP
 host 10.0.2.105
object network SERVER2004_FTP_SSL
 host 10.0.2.105
object network SERVER2005_HTTP
 host 10.0.2.106
object network SERVER2005_HTTPS
 host 10.0.2.106
object network SERVER3001_ICMP
 host 10.0.2.201
access-list Default_Tunnel_Group_Name_VPN_splitTunnelAcl standard permit 10.0.2.0 255.255.255.0
access-list OutsideToInside extended permit tcp any host 10.0.2.104 eq www
access-list OutsideToInside extended permit tcp any host 10.0.2.104 eq https
access-list OutsideToInside extended permit tcp any host 10.0.2.105 eq www
access-list OutsideToInside extended permit tcp any host 10.0.2.105 eq https
access-list OutsideToInside extended permit tcp any host 10.0.2.103 eq www
access-list OutsideToInside extended permit tcp any host 10.0.2.103 eq https
access-list OutsideToInside extended permit tcp any host 10.0.2.102 eq 12489
access-list OutsideToInside extended permit tcp any host 10.0.2.103 eq 12489
access-list OutsideToInside extended permit tcp any host 10.0.2.104 eq 12489
access-list OutsideToInside extended permit tcp any host 10.0.2.105 eq 12489
access-list OutsideToInside extended permit tcp any host 10.0.2.202 eq 12489
access-list OutsideToInside extended permit tcp any host 10.0.2.202 eq www
access-list OutsideToInside extended permit tcp any host 10.0.2.202 eq https
access-list OutsideToInside extended permit tcp any host 10.0.2.105 eq ftp
access-list OutsideToInside extended permit tcp any host 10.0.2.105 eq ftp-data
access-list OutsideToInside extended permit tcp any host 10.0.2.105 eq 990
access-list OutsideToInside extended permit tcp any host 10.0.2.106 eq www
access-list OutsideToInside extended permit tcp any host 10.0.2.106 eq https
access-list inside_access_in extended permit ip any any
pager lines 24
logging enable
logging asdm informational
mtu inside 1500
mtu outside 1500
icmp unreachable rate-limit 1 burst-size 1
icmp permit any inside
icmp permit any outside
no asdm history enable
arp timeout 14400
no arp permit-nonconnected
nat (inside,outside) source static any any destination static VPN_NETWORK VPN_NETWORK route-lookup
nat (inside,outside) source static NETWORK_OBJ_10.0.2.0_24 NETWORK_OBJ_10.0.2.0_24 destination static NETWORK_OBJ_10.0.2.0_25 NETWORK_OBJ_10.0.2.0_25 no-proxy-arp route-lookup
!
object network obj_any
 nat (inside,outside) dynamic interface
object network SERVER2003_HTTP
 nat (inside,outside) static 82.94.XXX.XXX service tcp www www
object network SERVER2003_HTTPS
 nat (inside,outside) static 82.94.XXX.XXX service tcp https https
object network SERVER2004_HTTP
 nat (inside,outside) static 82.94.XXX.XXX service tcp www www
object network SERVER2004_HTTPS
 nat (inside,outside) static 82.94.XXX.XXX service tcp https https
object network SERVER2002_HTTP
 nat (inside,outside) static 82.94.XXX.XXX service tcp www www
object network SERVER2002_HTTPS
 nat (inside,outside) static 82.94.XXX.XXX service tcp https https
object network SERVER2002_NAGIOS
 nat (inside,outside) static 82.94.XXX.XXX service tcp 12489 12489
object network SERVER2003_NAGIOS
 nat (inside,outside) static 82.94.XXX.XXX service tcp 12489 12489
object network SERVER2004_NAGIOS
 nat (inside,outside) static 82.94.XXX.XXX service tcp 12489 12489
object network SERVER3001_NAGIOS
 nat (inside,outside) static 82.94.XXX.XXX service tcp 12489 12489
object network SERVER2001_NAGIOS
 nat (inside,outside) static 82.94.XXX.XXX service tcp 12489 12489
object network SERVER3001_HTTP
 nat (inside,outside) static 82.94.XXX.XXX service tcp www www
object network SERVER3001_HTTPS
 nat (inside,outside) static 82.94.XXX.XXX service tcp https https
object network SERVER2004_FTP
 nat (inside,outside) static 82.94.XXX.XXX service tcp ftp ftp
object network SERVER2004_FTP_TCP
 nat (inside,outside) static 82.94.XXX.XXX service tcp ftp-data ftp-data
object network SERVER2004_FTP_SSL
 nat (inside,outside) static 82.94.XXX.XXX service tcp 990 990
object network SERVER2005_HTTP
 nat (inside,outside) static 82.94.XXX.XXX service tcp www www
object network SERVER2005_HTTPS
 nat (inside,outside) static 82.94.XXX.XXX service tcp https https
access-group inside_access_in in interface inside
access-group OutsideToInside in interface outside
route outside 0.0.0.0 0.0.0.0 82.94.XXX.XXX 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
aaa authentication serial console LOCAL
aaa authentication ssh console LOCAL
aaa authentication http console LOCAL
http server enable
http XXX.XXX.XXX.XXX 255.255.255.255 outside
http XXX.XXX.XXX.XXX 255.255.255.255 outside
http XXX.XXX.XXX.XXX 255.255.255.255 outside
http XXX.XXX.XXX.XXX 255.255.255.255 outside
http 10.0.2.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
crypto ipsec ikev1 transform-set ESP-AES-256-MD5 esp-aes-256 esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-DES-SHA esp-des esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-DES-MD5 esp-des esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-AES-192-MD5 esp-aes-192 esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-128-SHA esp-aes esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-192-SHA esp-aes-192 esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-128-MD5 esp-aes esp-md5-hmac
crypto ipsec security-association pmtu-aging infinite
crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set ikev1 transform-set ESP-AES-128-SHA ESP-AES-128-MD5 ESP-AES-192-SHA ESP-AES-192-MD5 ESP-AES-256-SHA ESP-AES-256-MD5 ESP-3DES-SHA ESP-3DES-MD5 ESP-DES-SHA ESP-DES-MD5
crypto map outside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
crypto map outside_map interface outside
crypto ca trustpool policy
crypto ikev1 enable outside
crypto ikev1 policy 10
 authentication crack
 encryption aes-256
 hash sha
 group 2
 lifetime 86400
crypto ikev1 policy 20
 authentication rsa-sig
 encryption aes-256
 hash sha
 group 2
 lifetime 86400
crypto ikev1 policy 30
 authentication pre-share
 encryption aes-256
 hash sha
 group 2
 lifetime 86400
crypto ikev1 policy 40
 authentication crack
 encryption aes-192
 hash sha
 group 2
 lifetime 86400
crypto ikev1 policy 50
 authentication rsa-sig
 encryption aes-192
 hash sha
 group 2
 lifetime 86400
crypto ikev1 policy 60
 authentication pre-share
 encryption aes-192
 hash sha
 group 2
 lifetime 86400
crypto ikev1 policy 70
 authentication crack
 encryption aes
 hash sha
 group 2
 lifetime 86400
crypto ikev1 policy 80
 authentication rsa-sig
 encryption aes
 hash sha
 group 2
 lifetime 86400
crypto ikev1 policy 90
 authentication pre-share
 encryption aes
 hash sha
 group 2
 lifetime 86400
crypto ikev1 policy 100
 authentication crack
 encryption 3des
 hash sha
 group 2
 lifetime 86400
crypto ikev1 policy 110
 authentication rsa-sig
 encryption 3des
 hash sha
 group 2
 lifetime 86400
crypto ikev1 policy 120
 authentication pre-share
 encryption 3des
 hash sha
 group 2
 lifetime 86400
crypto ikev1 policy 130
 authentication crack
 encryption des
 hash sha
 group 2
 lifetime 86400
crypto ikev1 policy 140
 authentication rsa-sig
 encryption des
 hash sha
 group 2
 lifetime 86400
crypto ikev1 policy 150
 authentication pre-share
 encryption des
 hash sha
 group 2
 lifetime 86400
telnet timeout 5
ssh 10.0.2.0 255.255.255.0 inside
ssh XXX.XXX.XXX.XXX 255.255.255.255 outside
ssh XXX.XXX.XXX.XXX 255.255.255.255 outside
ssh XXX.XXX.XXX.XXX 255.255.255.255 outside
ssh XXX.XXX.XXX.XXX 255.255.255.255 outside
ssh timeout 60
console timeout 0
management-access inside

dhcpd auto_config outside
!
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
ntp server 213.132.202.192 source outside
ntp server 72.251.252.11 source outside
ntp server 131.211.8.244 source outside
group-policy Default_Tunnel_Group_Name_VPN internal
group-policy Default_Tunnel_Group_Name_VPN attributes
 dns-server value 194.109.104.104 194.109.9.99
 vpn-tunnel-protocol ikev1
 split-tunnel-policy tunnelspecified
 split-tunnel-network-list value
Default_Tunnel_Group_Name_VPN_splitTunnelAcl
username ******* password ************* encrypted privilege 0
username ******* attributes
 vpn-group-policy Default_Tunnel_Group_Name_VPN
username ******* password ************* encrypted privilege 15
username ******* password ************* encrypted privilege 0
username ******* attributes
 vpn-group-policy Default_Tunnel_Group_Name_VPN
username ******* password ************* encrypted privilege 0
username ******* attributes
 vpn-group-policy Default_Tunnel_Group_Name_VPN
tunnel-group Default_Tunnel_Group_Name_VPN type remote-access
tunnel-group Default_Tunnel_Group_Name_VPN general-attributes
 address-pool VPN_IP_POOL
 default-group-policy Default_Tunnel_Group_Name_VPN
tunnel-group Default_Tunnel_Group_Name_VPN ipsec-attributes
 ikev1 pre-shared-key *****
!
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 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 icmp error
  inspect ftp
  inspect icmp
!
service-policy global_policy global
prompt hostname context
no call-home reporting anonymous
Cryptochecksum:655f9d00d6ed1c593506cbf9a876cd49
: end
CISCOASACLOUD#

答案1

您的所有配置看起来都很好,我可以看到您使用 ACL 仅允许所需的流量进入您的服务器。如果您希望任何人都能够在公共 IP 接口上 ping 您的服务器,您需要添加以下 ACL:

访问列表 OutsideToInside 扩展允许 icmp any any

或者您可以选择服务器,而不是允许 ping 全部/任何服务器。

答案2

我找到解决办法了!

事实上我必须在我的外部接口上扩展我的访问列表!!!

我已经成功使用 ASDM。

首先,我为每台服务器创建了一个新的网络对象。当您创建新对象时,系统会要求您提供内部 IP 地址,并且“这就是奇迹发生的地方”,您必须设置 NAT IP 地址(外部地址)!!!

其次,我通过在“公共服务器列表”中定义每个服务器和所需的服务(echo、echo-r​​eply)来扩展外部接口上的访问列表。当我执行这两个步骤时,我能够从互联网 ping 服务器。

我的访问列表现在如下所示:

访问列表 OutsideToInside 扩展允许 icmp any4 对象 SERVER2003 对象组 DM_INLINE_ICMP_2 访问列表 OutsideToInside 扩展允许 icmp any4 对象 SERVER2002 对象组 DM_INLINE_ICMP_1 访问列表 OutsideToInside 扩展允许 icmp any4 对象 SERVER2004 对象组 DM_INLINE_ICMP_0

对象网络 SERVER2004 nat(内部,外部)静态 82.94.xxx.xxx 对象网络 SERVER2002 nat(内部,外部)静态 82.94.xxx.xxx 对象网络 SERVER2003 nat(内部,外部)静态 82.94.xxx.xxx

答案3

有时人们确实应该将 ASDM 用于他们的 ASA 防火墙。

没什么可羞耻的。我管理过数百台 Cisco ASA 设备,使用 ASDM 和命令行的比例是 80:20。

数据包跟踪器 GUI 非常简单,可以准确地告诉您发生这种情况的位置。还有一个 CLI 等效程序。

icmp无论如何,我的配置中只有:

access-list outside_access_in extended permit icmp any any

您需要使用OutsideToInside访问组,但这确实应该可行。

相关内容