参考:http://blog.csdn.net/rosten/article/details/25053523
或者:http://blog.csdn.net/zhang197093/article/details/50365925
修改设置到:
/etc/sysconfig
然后修改iptables
在linux中关闭防火墙有两种状态一种永久关闭防火墙,另一种是暂时关闭防火墙的方法,下面我们一起来看看具体的操作步骤。 关闭虚拟机防火墙:
关闭命令: service iptables stop 永久关闭防火墙:chkconfig iptables off 两个命令同时运行,运行完成后查看防火墙关闭状态 service iptables status
1 关闭防火墙-----service iptables stop
2 启动防火墙-----service iptables start
3 重启防火墙-----service iptables restart
4 查看防火墙状态--service iptables status
5 永久关闭防火墙--chkconfig iptables off
6 永久关闭后启用--chkconfig iptables on
当系统提示:
Redirecting to /bin/systemctl restart iptables.service
就输入:
bin/systemctl restart iptables.service进行重启防火墙。