CentOS 7 关闭打开防火墙
启动防火墙
systemctl start firewalld
禁用防火墙
systemctl stop firewalld
设置开机启动
systemctl enable firewalld
停止并禁用开机启动
sytemctl disable firewalld
重启防火墙
firewall-cmd --reload
查看状态
systemctl status firewalld
CentOS 6 关闭打开防火墙
开启防火墙(重启后永久生效)
chkconfig iptables on
关闭防火墙(重启后永久生效)
chkconfig iptables off
开启防火墙(即时生效,重启后失效)
service iptables start
关闭防火墙(即时生效,重启后失效)
service iptables stop
重启防火墙
service iptables restartd
[root@bbb-2 ~]# vim /etc/selinux/config --> SELINUX=disabled
[root@bbb-2 ~]# service iptables status
[root@bbb-2 ~]# service iptables stop
[root@bbb-2 ~]# chkconfig iptables off 关闭自启