Centos7.x 系统如何关闭系统自带防火墙或调整设置iptables – 蓝队云 | 您所在的位置:网站首页 › centos关闭iptables防火墙 › Centos7.x 系统如何关闭系统自带防火墙或调整设置iptables – 蓝队云 |
Centos7.x 系统如何关闭系统自带防火墙或调整设置iptables
2016-10-31 08:20:03
2664
CentOS 7.x系统默认使用的是firewall做防火墙,而且有些端口没有开放,需要临时关闭或进行调整。如使用iptables需重新设置。 1、直接关闭防火墙 systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动2、设置 iptables service yum -y install iptables-services如果要修改防火墙配置,可以直接编辑配置文件或使用命令进行添加即可。比如编辑配置文件增加规则:vi /etc/sysconfig/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT保存退出。 systemctl restart iptables.service #重启生效 systemctl enable iptables.service #设置开机启动 会员登录 账号或邮箱登录还没有账号?立即 免费注册 其他账户快捷登录: 忘记密码? 上一篇:Linux下vnc简单配置实现以及应用下一篇:Linux 将任务放到后台虚拟终端执行screen命令使用说明 |
CopyRight 2018-2019 实验室设备网 版权所有 |