https://juejin.cn/post/6844903888768761870
https://www.linuxbaike.com/centos-7-iptables/
https://blog.csdn.net/Victor2code/article/details/105768946
禁用firewalld并安装iptables
禁用80 , 443的出口流量
systemctl stop firewalld
yum install -y iptables-services
iptables -L
iptables -I INPUT -p tcp --dport 80 -m state --state NEW -j ACCEPT
iptables -I INPUT -p tcp --dport 8080 -m state --state NEW -j ACCEPT
iptables -I INPUT -p tcp --dport 3306 -m state --state NEW -j ACCEPT
iptables-save > /etc/sysconfig/iptables
iptables -L OUTPUT -n --line-number
iptables -A OUTPUT -p tcp --dport 80 -j DROP
iptables -A OUTPUT -p tcp --dport 443 -j DROP
iptables-save > /etc/sysconfig/iptables
iptables -L OUTPUT -n --line-number
iptables -D OUTPUT 2
iptables -D OUTPUT 1
iptables -L OUTPUT -n --line-number
iptables -A OUTPUT -p tcp --dport 443 -j DROP
iptables -A OUTPUT -p tcp --dport 80 -j DROP