基本上,计算机位于10.0.0.0/16子网中,我将在具有iptables的Linux上应用的规则是
iptables -t mangle -N RAYS
iptables -t mangle -A RAYS -d 127.0.0.1/32 -j RETURN
iptables -t mangle -A RAYS -d 224.0.0.0/4 -j RETURN
iptables -t mangle -A RAYS -d 255.255.255.255/32 -j RETURN
iptables -t mangle -A RAYS -d 10.0.0.0/16 -p tcp -j RETURN
iptables -t mangle -A RAYS -d 10.0.0.0/16 -p udp ! --dport 53 -j RETURN
iptables -t mangle -A RAYS -p udp -j TPROXY --on-port 12345 --tproxy-mark 1
iptables -t mangle -A RAYS -p tcp -j TPROXY --on-port 12345 --tproxy-mark 1
但是我不知道如何使用pf在macOS上编写等效规则。我现在想出并尝试过的是
pass in inet proto udp from any port 53 to 127.0.0.1 port 12345
pass in inet proto tcp from any to 127.0.0.1 port 12345
显然,它们甚至与iptables中的规则也不相近。
请向我说明一下,非常感谢!
无缘无故投票? wtf?
如果您不想回答这个他妈的问题,那就把它留在这里!或给我一个令人讨厌的理由来投票!