思科網絡設備安全配置遵循「邊緣阻斷、核心管控、數據加密、審計追溯」四層模型,本文系統梳理路由器/交換機/防火牆關鍵安全配置。
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
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
interface Gi1/0/1
ip verify source port-security
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
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 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
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
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-encryptionDESC: TO_FW_OUTSIDE | CIRCUIT_ID: CT-10G-001shutdown並分配隔離VLAN安全配置不是一次性動作,而是持續的基線合規、漏洞修補、審計複核閉環。