无法正确配置 Cisco-ASA 5505

网络工程 思科 思科 防火墙
2021-07-13 01:22:54

就配置我的 ASA-5505 而言,我已经在这里工作了 2 天,浏览了无数论坛和教程。我无法上网(即使使用来自 ASA 的 ping),我也无法“看到”网络上的 ASA .. 基本上它是除控制台之外的一个死硬件。我的调制解调器也已设置为桥接模式。这是我遵循的教程:这里.. 不知道下一步该去哪里 .. “外部” vlan 似乎配置错​​误,而且我已经尝试了很多渗透,我确信我忽略了一些重要且显而易见的事情。当我能够从 ASA ping 8.8.8.8 时,我会很高兴!

这是我的康卡斯特设置:

Gateway MAC Address           78:CD:8E:D9:FB:34
WAN MAC Address               78:CD:8E:D9:FB:37
WAN DHCP IP Address           50.135.170.116
WAN DHCP IPv6 Address         ::/64
WAN DHCP IPv6 DNS (primary)   ::
WAN DHCP IPv6 DNS (secondary) ::
WAN DHCP Subnet Mask          255.255.254.0
WAN DHCP Default Gateway      50.xx.xx.1
WAN Internet IP Address       74.xx.xx.230
DNS (primary)                 75.75.75.75
DNS (secondary)               75.75.76.76
DHCP Time Remaining           92h:42m:22s
Internal Gateway IP Address   10.1.10.1
Internal Subnet Mask          255.255.255.0
INTERNAL DHCP                 DISABLED

这是我的 ASA 配置:

ASA Version 8.2(5)
!
hostname DTS-ASA
enable password xxxxxxxxxxxxxx encrypted
passwd xxxxxxxxxxx encrypted
names
!
interface Ethernet0/0
 switchport access vlan 2
!
interface Ethernet0/1
!
interface Ethernet0/2
 shutdown
!
interface Ethernet0/3
 shutdown
!
interface Ethernet0/4
 shutdown
!
interface Ethernet0/5
 shutdown
!
interface Ethernet0/6
 shutdown
!
interface Ethernet0/7
 shutdown
!
interface Vlan1
 nameif inside
 security-level 100
 ip address 10.1.10.100 255.255.255.0
!
interface Vlan2
 nameif outside
 security-level 0
 ip address 74.xx.xx.230 255.255.255.248
!
ftp mode passive
pager lines 24
mtu inside 1500
mtu outside 1500
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
global (outside) 10 interface
nat (inside) 10 10.1.10.0 255.255.255.0
route outside 0.0.0.0 0.0.0.0 74.xx.xx.230 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 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
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
crypto ipsec security-association lifetime seconds 28800
crypto ipsec security-association lifetime kilobytes 4608000
telnet timeout 5
ssh timeout 5
console timeout 0

threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
username cisco password ZBZ8GNEdrJsjFvsR encrypted privilege 15
!
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 ip-options
  inspect netbios
  inspect rsh
  inspect rtsp
  inspect skinny
  inspect esmtp
  inspect sqlnet
  inspect sunrpc
  inspect tftp
  inspect sip
  inspect xdmcp
!
 service-policy global_policy global
prompt hostname context
no call-home reporting anonymous
call-home
 profile CiscoTAC-1
  no active
  destination address http https://tools.cisco.com/its/service/oddce/services/DDCEService
  destination address email callhome@cisco.com
  destination transport-method http
  subscribe-to-alert-group diagnostic
  subscribe-to-alert-group environment
  subscribe-to-alert-group inventory periodic monthly
  subscribe-to-alert-group configuration periodic monthly
  subscribe-to-alert-group telemetry periodic daily
Cryptochecksum:86f051cb52af3d343c52cf1a222c6901
: end

链接 我说过,我可能遗漏了一些关键和明显的东西,但是拥有开发背景网络是一个有点陌生的概念。

2个回答

“外部”vlan 似乎配置错​​误,我已经尝试了很多渗透,我确信我忽略了一些重要且显而易见的事情。当我能够从 ASA ping 8.8.8.8 时,我会很高兴!

基本配置

正如其他人所提到的,您的配置是“次优的”...您遇到的最大问题是您没有在外部 Vlan 接口上使用 DHCP最大的问题是您的默认 gw 地址分配给了 Vlan2...以恢复, 登录到控制台并...

  • copy runn flash:foobar.cfg
  • config t
  • configure factory-default 10.1.10.100 255.255.255.0

当您处于配置模式时,请使用此配置...

hostname DTS-ASA
password ChangeMeNow
enable password ChangeMeNow
!
interface Ethernet0/0
 switchport access vlan 2
!
interface Vlan2
 ! I don't think you need this, since it's an SMC MAC addr
 ! However, this illustrates how you can manually change the mac
 ! on your outside Vlan, if Comcast is restricting you
 ! to one mac (and now refuses to change it)
 ! mac-address 78cd.8ed9.fb37
 nameif outside
 security-level 0
 ip address 74.xx.xx.225 255.255.255.248
!
route outside 0.0.0.0 0.0.0.0 74.xx.xx.230
global (outside) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0
end
wr mem

请更改密码 :-)... 现在您需要 fw 规则,但这是一个不同的问题

广域网验证

确保您确实将 Comcast 调制解调器连接到 Eth0/0...启动并运行后,您应该能够像这样检查从 Comcast 获得的地址...

DTS-ASA# sh int vlan2
Interface Vlan2 "outside", is up, line protocol is up
  Hardware is EtherSVI, BW 100 Mbps, DLY 100 usec
        MAC address 0030.dead.beef, MTU 1500
        IP address 74.xx.xx.225, subnet mask 255.255.255.248     <------------
  Traffic Statistics for "outside":
        108703406 packets input, 119199091796 bytes
        69134254 packets output, 8083775282 bytes
        1654709 packets dropped
      1 minute input rate 2 pkts/sec,  280 bytes/sec
      1 minute output rate 3 pkts/sec,  414 bytes/sec
      1 minute drop rate, 0 pkts/sec
      5 minute input rate 3 pkts/sec,  716 bytes/sec
      5 minute output rate 4 pkts/sec,  520 bytes/sec
      5 minute drop rate, 0 pkts/sec
DTS-ASA#

然后检查你对谷歌DNS的ping ...

DTS-ASA# ping 8.8.8.8
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 10/18/20 ms
DTS-ASA#

如果没有,请确保您可以 ping 您的默认网关...

DTS-ASA# sh route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 74.xx.xx.230 to network 0.0.0.0

C    74.xx.xx.230 255.255.255.248 is directly connected, outside
C    10.1.10.0 255.255.255.0 is directly connected, inside
d*   0.0.0.0 0.0.0.0 [1/0] via 74.xx.xx.230, outside          <------
DTS-ASA#
DTS-ASA# ping 74.xx.xx.230

我最近经历了同样的阶段,没有寻找上述配置的问题,如果您不知道自己在做什么并且想将 ASA 连接到互联网,我想说三件事

  1. 将设备恢复为默认值(您可能有很多配置错误)使用控制台连接类型http 0.0.0.0 0.0.0.0 INSIDEhttp 0.0.0.0 0.0.0.0 OUTSIDE,以便您可以使用 ASDM 访问 ASA
  2. 使用基本许可证,您将拥有 2 个 VLAN(一侧将是互联网,另一侧可以是您的家庭网络侧)默认情况下,当您进行恢复时,Int F0/0 将是互联网侧(VLAN 2),了解每个的子网信息虚拟局域网。是的,每个人都会有所不同,你计算一下。
  3. 使用指南类型 0.0.0.0 0.0.0.0 XXXX(INTERNETMODEADDRESS,下一跳)在 ASA 上创建默认路由
  4. 在外部接口上创建访问列表规则以允许 ICMP 复制,如果你不这样做,你的 Ping 到 8.8.8.8 将无法回复你。

希望有人觉得这有帮助。这是我 2 天的发现过程。

:)