山石防火墙封禁IP命令
时间: 2023-06-28 19:13:18 浏览: 335
山石防火墙封禁IP的命令如下:
1. 单个 IP 封禁
```
config firewall address
edit "block-ip"
set subnet <IP地址/32>
next
end
config firewall policy
edit 1
set srcintf "any"
set dstintf "any"
set srcaddr "block-ip"
set action deny
set schedule "always"
set service "ALL"
set logtraffic enable
next
end
```
其中,将 `<IP地址/32>` 替换成需要封禁的 IP 地址即可。
2. IP 段封禁
```
config firewall address
edit "block-range"
set subnet <起始IP地址/子网掩码>
next
end
config firewall policy
edit 1
set srcintf "any"
set dstintf "any"
set srcaddr "block-range"
set action deny
set schedule "always"
set service "ALL"
set logtraffic enable
next
end
```
其中,将 `<起始IP地址/子网掩码>` 替换成需要封禁的 IP 地址段即可。
注意:以上命令仅供参考,具体操作需要根据实际情况进行调整。在使用过程中,请务必谨慎操作,以免对网络安全造成不利影响。
阅读全文
相关推荐







