許多初級網管在部署思科路由器時容易忽略安全細節,導致設備暴露於攻擊面。本文系統梳理「訪問控制」與「網絡服務」兩大維度的加固措施,附帶實戰 CLI 指令,適合作為基礎安全基線參考。
admin。login on-failure log 與 login on-success log。access-list 10 permit 192.168.10.0 0.0.0.255 → line vty 0 4 → access-class 10 in → transport input ssh。| 措施 | 說明 |
|---|---|
| 物理斷線 | 機箱可開時,拔除 Console 纜線 |
| 修改預設屬性 | 波特率改為非 9600(如 115200) |
| ACL 限制 | 僅允許特定管理主機 IP 連線 |
| 強密碼 + 超時 | password 7 ComplexP@ss + exec-timeout 5 0 |
line aux 0
transport input none
no exec
username NetAdmin privilege 15 secret Str0ngP@ss
privilege exec level 10 show ip access-list
privilege exec level 10 telnet
enable secret 並加密所有密碼enable secret C1sc0$ecret
service password-encryption
line vty 0 4 → session-limit 3ip ftp username NetAdmin
ip ftp password FtpP@ss123
copy startup-config ftp://NetAdmin:FtpP@ss123@192.168.10.100/router-backup.cfg
訂閱 Cisco Security Advisories,建立定期升級窗口,優先修補 CVSS ≥ 7.0 的漏洞。
no cdp run
interface GigabitEthernet0/0
no cdp enable
no service tcp-small-servers
no service udp-small-servers
no ip finger
no service finger
username WebAdmin privilege 15 secret WebP@ss
ip http authentication local
access-list 10 permit 192.168.10.50
access-list 10 deny any
ip http access-class 10
ip http server
no ip bootp server
no boot network
no service config
no ip source-route
no ip proxy-arp
interface GigabitEthernet0/0
no ip proxy-arp
no ip directed-broadcast
no ip classless
interface GigabitEthernet0/0
no ip unreachables
no ip redirects
no ip mask-reply
no snmp-server community public RO
no snmp-server community admin RW
access-list 70 deny any
snmp-server community Str0ngC0mmunity RO 70
no snmp-server enable traps
no snmp-server system-shutdown
no ip domain-lookup
! 若需啟用
hostname Core-Router
ip name-server 202.102.134.96
interface GigabitEthernet0/3
shutdown
最佳實踐提醒:以上配置應納入「標準化部署模板」,並透過 archive 功能定期備份配置檔。配合 NetFlow + Syslog + TACACS+ 可構建完整可審計的安全運營閉環。