萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 網路安全 >  >> 網路應用技術 >> 應用程式教學

思科路由交換網絡安全配置詳解:從邊緣到核心的纵深防御

網絡安全配置纵深防御架構

思科網絡設備安全配置遵循「邊緣阻斷、核心管控、數據加密、審計追溯」四層模型,本文系統梳理路由器/交換機/防火牆關鍵安全配置。

第一層:邊緣接入安全 (交換機接入層)

端口安全


interface range Gi1/0/1-48
 switchport mode access
 switchport port-security
 switchport port-security maximum 2
 switchport port-security violation restrict
 switchport port-security aging time 30
 switchport port-security aging type inactivity
 spanning-tree portfast
 spanning-tree bpduguard enable

DHCP Snooping + DAI (動態ARP檢測)


ip dhcp snooping
ip dhcp snooping vlan 10,20,30
ip dhcp snooping limit rate 10
no ip dhcp snooping information option
!
ip arp inspection vlan 10,20,30
ip arp inspection validate src-mac dst-mac ip

IP Source Guard


interface Gi1/0/1
 ip verify source port-security

第二層:核心轉發平面防護

控制平面保護 (CoPP)


class-map type control-plane match-any CPP-CRITICAL
 match protocol ssh
 match protocol bgp
 match protocol ospf
!
policy-map type control-plane CPP-POLICY
 class CPP-CRITICAL
  police 100000 conform transmit exceed drop
 class class-default
  police 10000 conform transmit exceed drop
!
control-plane
 service-policy input CPP-POLICY

基礎設施ACL (iACL) - 僅允許授權管理源


ip access-list extended INFRA-ACL-IN
 permit tcp host 192.168.100.10 any eq 22      ! SSH管理站
 permit udp host 192.168.100.11 any eq snmp    ! SNMP監控
 permit udp any any eq ntp                      ! NTP時間同步
 deny   ip any any log
!
interface GigabitEthernet0/0
 ip access-group INFRA-ACL-IN in

第三層:管理平面加固

AAA認證授權體系


aaa new-model
aaa authentication login default group tacacs+ local
aaa authorization commands 15 default group tacacs+ local
aaa accounting exec default start-stop group tacacs+
aaa accounting commands 15 default start-stop group tacacs+
!
tacacs server TACACS-01
 address ipv4 192.168.100.10
 key Tacacs@Secret
 single-connection

安全管理協議


ip ssh version 2
ip ssh time-out 60
ip ssh authentication-retries 3
no ip http server
ip http secure-server
ip http authentication aaa
!
snmp-server group NETWORK-MON v3 auth read ALL-OIDS write NONE
snmp-server user NAGIOS NETWORK-MON v3 auth sha Snmp@Auth priv aes Snmp@Priv
snmp-server host 192.168.100.11 informs version 3 auth NAGIOS

第四層:數據平面加密與審計

站點間IPsec VPN


crypto isakmp policy 10
 encr aes 256
 hash sha256
 authentication pre-share
 group 14
 lifetime 86400
!
crypto ipsec transform-set AES256-SHA256 esp-aes 256 esp-sha256-hmac
 mode tunnel
!
crypto map VPN-MAP 10 ipsec-isakmp
 set peer 203.0.113.5
 set transform-set AES256-SHA256
 match address VPN-TRAFFIC
!
interface Tunnel0
 ip address 10.255.255.1 255.255.255.252
 tunnel source GigabitEthernet0/1
 tunnel destination 203.0.113.5
 tunnel mode ipsec ipv4
 tunnel protection ipsec profile VPN-PROF

NetFlow/可視化審計


flow record NETFLOW-IPV4
 match ipv4 source address
 match ipv4 destination address
 match transport source-port
 match transport destination-port
 collect counter bytes
 collect counter packets
 collect timestamp sys-uptime first
 collect timestamp sys-uptime last
!
flow exporter SOLARWINDS
 destination 192.168.100.20
 source GigabitEthernet0/0
 transport udp 2055
!
flow monitor NETFLOW-MON
 record NETFLOW-IPV4
 exporter SOLARWINDS
 cache timeout active 60
 cache timeout inactive 15
!
interface GigabitEthernet0/1
 ip flow monitor NETFLOW-MON input

合規基線檢查清單 (自動化腳本建議項目)

  • ☐ 所有設備啟用service password-encryption
  • ☐ 無明文密碼、默認帳號、空密碼
  • ☐ 管理介面僅允許SSHv2/HTTPS,禁用Telnet/HTTP
  • ☐ NTP源認證、時區統一、日誌時間戳毫秒級
  • ☐ 接口描述規範:DESC: TO_FW_OUTSIDE | CIRCUIT_ID: CT-10G-001
  • ☐ 未使用端口shutdown並分配隔離VLAN
  • ☐ 配置變更納入變更管理流程,備份自動歸檔

安全配置不是一次性動作,而是持續的基線合規、漏洞修補、審計複核閉環。

copyright © 萬盛學電腦網 all rights reserved