#查看防火墙状态
systemctl status firewalld
#关闭防火墙
systemctl stop firewalld
#禁止开机启动防火墙
systemctl disable firewalld
#开启防火墙
systemctl start firewalld
===============================================================================
虚拟机centOS7 关闭防火墙后, 有时还是会出现 能ping通虚拟机ip 但是telnet虚拟机端口不通 解决办法:disable seLinux
#修改config文件 vi /etc/selinux/config #注释掉SELINUX=enforcing, 改用disabled #SELINUX=enforcing SELINUX=disabled 保存退出 reboot