我可以使用以下命令(如ubuntu上的stackoverflow.com )将域/ipaddress列入黑名单
iptables -N mychain;
iptables -I OUTPUT -p tcp --dport 80 -j mychain;
iptables -I OUTPUT -p tcp --dport 443 -j mychain;
iptables -A mychain -m string --algo bm --string "stackoverflow.com" -j DROP或
iptables -A mobicontrol -d stackoverflow.com -j REJECT问题:如果我必须阻止"https://stackoverflow.com/questions“而不是stackoverflow.com,那么我如何才能阻止这个特定的url。我试过使用字符串标志,如
iptables -A mychain -m string --algo bm --string "stackoverflow.com/questions" -j DROP
or
iptables -A mychain -m string --algo bm --string "questions" -j DROP但无法阻止"https://stackoverflow.com/questions“和stackoverflow.com. not /文档
发布于 2020-10-22 06:15:01
https://askubuntu.com/questions/1285838
复制相似问题