Cisco ASA 5508x,VLAN 无法通信

网络工程 思科
2021-07-16 16:42:07

我们正在转向更安全的系统,第一步是添加此安全设备。目前有两个小型准家用级 Cisco 路由器(rv260W 和 rv130)。在我们购买更合适的路由设备之前,该设备将接管他们的所有职责。

我已尽我所能在 ASA 中复制了两台路由器的设置,将 VLAN 设置为相同的安全级别,并尽力在它们之间添加路由。数据包跟踪按预期工作,但两个 VLAN 之间的实际 ping 和 http 请求超时。通过将两台测试机器上的主 DNS 设置为它们各自的网关,我取得了一些成功,但感觉这很糟糕,我宁愿做对。

是否发生串扰其实并不重要,除了位于 VOIP 网络上的 PBX,我们需要能够看到它。

当前配置(为安全起见删除了某些部分):

ASA Version 9.8(2)
!
hostname x
enable password x
names

!
interface GigabitEthernet1/1
 nameif outside
 security-level 0
 ip address x 255.255.255.252
!
interface GigabitEthernet1/2
 nameif inside
 security-level 100
 ip address 192.168.0.254 255.255.254.0
!
interface GigabitEthernet1/3
 nameif VOIP
 security-level 100
 ip address 172.16.0.99 255.255.255.0
!
interface Management1/1
 management-only
 no nameif
 no security-level
 no ip address
!
ftp mode passive
clock timezone CST -6
clock summer-time CDT recurring
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 inside
 subnet 192.168.0.0 255.255.254.0
object network phones
 subnet 172.16.0.0 255.255.255.0
object network obj_any_voip
 subnet 0.0.0.0 0.0.0.0
object-group protocol TCPUDP
 protocol-object udp
 protocol-object tcp
access-list internal extended permit ip any any
access-list internal extended permit icmp any any
access-list external extended permit ip any any
access-list external extended permit icmp any any
pager lines 24
logging enable
logging asdm informational
mtu outside 1500
mtu inside 1500
mtu VOIP 1500
no failover
no monitor-interface service-module
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
no arp permit-nonconnected
arp rate-limit 16384
!
object network obj_any
 nat (inside,outside) dynamic interface
object network obj_any_voip
 nat (VOIP,outside) dynamic interface
!
nat (inside,outside) after-auto source dynamic any interface
access-group internal in interface outside
access-group external in interface inside
access-group internal in interface VOIP
access-group global_access global
route outside 0.0.0.0 0.0.0.0 xx.xxx.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 sctp 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
timeout conn-holddown 0:00:15
timeout igp stale-route 0:01:10
user-identity default-domain LOCAL
aaa authentication login-history
http server enable
http 192.168.0.0 255.255.254.0 inside
no snmp-server location
no snmp-server contact
service sw-reset-button
crypto ipsec security-association pmtu-aging infinite
crypto ca trustpool policy
telnet timeout 5
ssh stricthostkeycheck
ssh timeout 5
ssh key-exchange group dh-group1-sha1
console timeout 0

dhcpd auto_config outside
!
dhcpd address 192.168.1.2-192.168.1.249 inside
dhcpd dns 192.168.0.254 interface inside
dhcpd lease 86400 interface inside
dhcpd domain BII interface inside
dhcpd enable inside
!
dhcpd address 172.16.0.120-172.16.0.219 VOIP
dhcpd dns 172.16.0.99 interface VOIP
dhcpd lease 86400 interface VOIP
dhcpd domain voip interface VOIP
dhcpd enable VOIP
!
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
dynamic-access-policy-record DfltAccessPolicy
!
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
  no tcp-inspection
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
!
service-policy global_policy global
prompt hostname context
no call-home reporting anonymous
Cryptochecksum: xxx

我对 Cisco 的东西(第一次 IT 工作)真的很陌生,所以欢迎提出任何建议。

 ciscoasa(config)# ping tcp 172.16.0.54 1
 Type escape sequence to abort.
 No source specified. Pinging from identity interface.
 Sending 5 TCP SYN requests to 172.16.0.54 port 1
 from 172.16.0.99, timeout is 2 seconds:
 RRRRR
 Success rate is 0 percent (0/5)

ciscoasa(config)# ping tcp 192.168.0.21 7
Type escape sequence to abort.
No source specified. Pinging from identity interface.
Sending 5 TCP SYN requests to 192.168.0.21 port 7
from 192.168.0.254, timeout is 2 seconds:
?????
Success rate is 0 percent (0/5)
1个回答

删除区域修复了异步路由问题(主要原因)。这是为了清理配置的其余部分,以便在某些地方更好地定义它。

interface GigabitEthernet1/2
 nameif inside
 security-level 100
 ip address 192.168.0.254 255.255.254.0

我知道你在所有地方都更正了你的掩码,但我想确定你打算让你的 ASA 是 192.168.0.254,即使 255.255.254.0 的掩码给你 192.168.0.0-192.168.1.255。让您的 ASA 接口实际上位于该范围的中间,而不是第一个或最后一个主机 IP 地址(192.168.0.1 或 192.168.1.254)似乎很奇怪。由于它是 192.168.0.254,它向我表明您可能希望掩码实际上是 /24 (255.255.255.0)。

object network obj_any
 subnet 0.0.0.0 0.0.0.0

object network obj_any
 nat (inside,outside) dynamic interface

这是所有 ASA 都附带的默认对象条目和 NAT,应该删除,因为它过于广泛,会引起安全问题并可能导致 NAT 问题。你应该删除这些。您已经有了更好定义的对象,但您缺少更好的 NAT 定义,因此这些只会增加混淆。请发出以下命令:

no object network obj_any
no object network obj_any_voip
!
object network inside
 nat (inside,outside) dynamic interface
!
object network phones
 nat (VOIP,outside) dynamic interface

下一个 NAT 是您的“一应俱全”语句,它没有做任何事情,因为您已经在其他 NAT 语句中包含了您唯一的网络。您可以选择保留它,或者删除它以使您的配置更清晰。

如果您选择保留它,我至少会为您的 VOIP 界面添加另一个“全能”:

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

如果您选择删除它,您可以使用以下命令:

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

您引用了一个全局访问列表,但实际上并没有global_access定义访问列表 ( ),因此它没有做任何事情。您可以通过发出以下命令来删除它:

no access-group global_access global

您在 DHCP 守护程序设置中将 ASA 接口 IP 地址引用为 DNS 服务器,但 ASA 不能用作 DNS 服务器 - 仅作为客户端 - 因此您需要为 DHCP 守护程序使用备用 DNS 服务器。请发出以下命令:

no dhcpd dns 192.168.0.254 interface inside
no dhcpd dns 172.16.0.99 interface VOIP
!
dhcpd dns <valid DNS server> interface inside
dhcpd dns <valid DNS server> interface VOIP

这就是我能看到的,暂时清理。如果您还有其他问题/疑问,请告诉我。