您好,您是在哪里进行操作屏蔽?如果是在系统防火墙的话,
CentOS7.6默认使用的是firewalld
禁止192.168.0.0/16
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.0.0/16" drop'
允许192.168.20.0/24
- firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.20.0/24" accept'
复制代码
操作完记得重载下系统防火墙
验证:
查看系统防火墙规则:
|