ipset黑白名单设置
程序员文章站
2022-03-07 22:40:13
...
iptables黑/白名单设置(使用ipset 工具)
参考链接:https://www.cnblogs.com/vijayfly/p/7205559.html
ipset create whitelist hash:ip;
ipset create blacklist hash:ip;
添加白名单
ipset add whitelist 192.168.1.100;
ipset add whitelist 192.168.1.101;
ipset add whitelist 192.168.1.102;
ipset add whitelist 192.168.1.103;
添加黑名单
ipset add blacklist 192.168.1.104;
ipset add blacklist 192.168.1.105;
ipset add blacklist 192.168.1.106;