我发现伪装很简单,如何非常有用,一切正常。 但是我不确定最后一行:
iptables -F iptables -t nat -F iptables -t mangle -F iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -m state --state NEW -i ! ppp0 -j ACCEPT iptables -P INPUT DROP #only if the first two are succesful iptables -A FORWARD -i ppp0 -o ppp0 -j REJECT
这个怎么没有解释。 这是为什么?
我想这是拒绝从外部到内部的stream量,但它是如何工作的? 也许最好写-i ppp0 -o eth0 (其中eth0是我的本地networking接口)?
FORWARD表用于pipe理通过该盒路由的数据包。 该规则基本上阻止任何通过ppp0接口路由的东西。