欢迎光临散文网 会员登陆 & 注册

【分享】框式交换机加固配置

2023-06-26 15:55 作者:微思网络  | 我要投稿

场景介绍

在现网中有各种攻击,而且攻击类型是不断变化的,无法用一种固定的防护方式防御所有攻击,所以需要根据实际的场景变化调整防护方式,下面提供一种使用范围比较广的防护脚本和攻击检测方式,可以防范TTL=1攻击、TCP攻击,并及时发现ARP、DHCP、IGMP的攻击用户。在检测到具体攻击后再结合防攻击故障定位指导章节介绍的防攻击部署方式调整配置进一步加固。



脚本部署

# 现网业务如未使用VLAN1,但接入设备和网关设备上使用的接口未退出VLAN1,存在被攻击或产生风暴的风险。接口退出VLAN1配置如下
• 接口类型为hybrid
• interface GigabitEthernet x/x/x
undo port hybrid vlan 1
• 接口类型为trunk
• interface GigabitEthernet x/x/x
• port link-type trunk
undo port trunk allow-pass vlan 1
• 接口类型为access
• interface GigabitEthernet x/x/x
• port link-type access
undo port default vlan 

# 主控板防攻击脚本部署
cpu-defend policy main-board        #创建防攻击策略main-board
car packet-type ttl-expired cir 16  #配置ttl-expired报文的CIR为16kbit/s
car packet-type tcp cir 32          #配置tcp报文的CIR为32kbit/s 
auto-defend enable                  #使能攻击溯源功能
auto-defend attack-packet sample 5  #配置攻击溯源的采样比为5
auto-defend threshold 30            #配置攻击溯源检查阈值为30pps
undo auto-defend trace-type source-portvlan   #配置攻击溯源的方式为基于源MAC地址和源IP地址
undo auto-defend protocol tcp telnet ttl-expired #在攻击溯源防范的报文类型列表中删除tcp、telnet和ttl-expired报文
auto-defend whitelist 1 interface GigabitEthernet x/x/x  #互联口和上行口加入白名单
auto-defend whitelist 2 interface GigabitEthernet x/x/x  #互联口和上行口加入白名单
auto-port-defend whitelist 1 interface GigabitEthernet x/x/x  #端口防攻击V200R003版本开始默认使能,互联口和上行口加入白名单
auto-port-defend whitelist 2 interface GigabitEthernet x/x/x  #端口防攻击V200R003版本开始默认使能,互联口和上行口加入白名单
cpu-defend-policy main-board       #应用防攻击策略

# 主控板防攻击脚本部署
cpu-defend policy main-board        #创建防攻击策略main-board
car packet-type ttl-expired cir 16  #配置ttl-expired报文的CIR为16kbit/s
car packet-type tcp cir 32          #配置tcp报文的CIR为32kbit/s 
auto-defend enable                  #使能攻击溯源功能
auto-defend attack-packet sample 5  #配置攻击溯源的采样比为5
auto-defend threshold 30            #配置攻击溯源检查阈值为30pps
undo auto-defend trace-type source-portvlan   #配置攻击溯源的方式为基于源MAC地址和源IP地址
undo auto-defend protocol tcp telnet ttl-expired #在攻击溯源防范的报文类型列表中删除tcp、telnet和ttl-expired报文
auto-defend whitelist 1 interface GigabitEthernet x/x/x  #互联口和上行口加入白名单
auto-defend whitelist 2 interface GigabitEthernet x/x/x  #互联口和上行口加入白名单
auto-port-defend whitelist 1 interface GigabitEthernet x/x/x  #端口防攻击V200R003版本开始默认使能,互联口和上行口加入白名单
auto-port-defend whitelist 2 interface GigabitEthernet x/x/x  #端口防攻击V200R003版本开始默认使能,互联口和上行口加入白名单
cpu-defend-policy main-board       #应用防攻击策略



【分享】框式交换机加固配置的评论 (共 条)

分享到微博请遵守国家法律