ubuntu 1604 iptables

2020-05-10 | By Jinyang | Filed in: 技术相关.

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


发表评论

电子邮件地址不会被公开。 必填项已用*标注