centos 7 firewall configure

关闭SELinux

关于Selinux 见selinux

sudo sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config

Firewalld 防火墙的关闭

sudo systemctl stop firewalld.service && systemctl disable firewalld.service

切换成UFW 防火墙

yum install ufw

UFW 的开启 与 关闭

ufw enable
ufw disable