ubuntu 1604 iptables

2020-05-10 by Jinyang | Filed under 技术相关.

iptables -L -n

iptables -A INPUT -p tcp –dport 9122 -j ACCEPT
iptables -A OUTPUT -p tcp –sport 9122 -j ACCEPT
iptables -A INPUT -p tcp –dport 80 -j ACCEPT
iptables -A OUTPUT -p tcp –sport 80 -j ACCEPT
iptables -A INPUT -p tcp –dport 443 -j ACCEPT
iptables -A OUTPUT -p tcp –sport 443 -j ACCEPT

iptables -A INPUT -p tcp --dport 53 -j ACCEPT

iptables -A INPUT -j drop
iptables -A OUTPUT -j DROP
iptables -A FORWARD -j DROP


发表评论

您的电子邮箱不会被公开。 标记为 * 的区域必须填写

This site uses Akismet to reduce spam. Learn how your comment data is processed.

返回顶部