首页/网络/网络设备配置速查/管理面 ACL:限制 VTY / SSH / SNMP 来源
ACL 与安全65 条

管理面 ACL:限制 VTY / SSH / SNMP 来源

把管理入口限制在运维网段是最基本的安全加固;三厂语法相近,但引用位置不同——VTY 引用的是 ACL 编号而不是接口。

网络设备配置速查网络更新于 2026-10-12
场景只允许运维网段登录设备
适用三厂
命令族user-interface vty / line vty + acl | access-class

华为 VRP

华为 VRP
acl number 2000
 rule 5 permit source 10.0.0.0 0.0.0.255
user-interface vty 0 4
 acl 2000 inbound
 authentication-mode aaa

思科 IOS

思科 IOS
access-list 10 permit 10.0.0.0 0.0.255.255
line vty 0 4
 access-class 10 in
 transport input ssh

H3C Comware

H3C Comware
acl basic 2000
 rule 0 permit source 10.0.0.0 0.0.0.255
line vty 0 4
 acl 2000 inbound
 authentication-mode scheme
差异:华为/H3C 在 user-interface / line 视图下用 acl <编号> inbound,思科用 access-class。配置前先确认自己当前的管理 IP 在放行范围内,否则会被锁在设备外。

易错点

  • 配完管理 ACL 不断开旧会话验证就退出,一旦写错只能去机房接 Console

数据来源与参考

  • Cisco IOS access-class 与 line vty 配置
  • 华为 VRP VTY ACL 配置举例
  • H3C Comware line vty ACL 配置

相关工具

​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌