CentOS7上防火墙操作
firewalld打开关闭防火墙与端口
启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status firewalld 开机禁用 : systemctl disable firewalld 开机启用 : systemctl enable firewalld
- 设置 iptables service
yum -y install iptables-services 如果要修改防火墙配置,如增加防火墙端口3306 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 #设置防火墙开机启动 最后重启系统使设置生效即可。
相关推荐
89284553 2020-07-17
大老张学编程 2020-07-04
lizhengfa 2020-06-26
Aveiox 2020-06-25
85407718 2020-06-10
老谢的自留地 2020-05-29
yshlovelx 2020-05-27
大老张学编程 2020-05-09
summerinsist 2020-04-23
89284553 2020-04-10
yshlovelx 2020-03-27
Wepe0 2020-10-30
Lostinthewoods 2020-10-29
hickwu 2020-10-23
focusforce 2020-10-10
summerinsist 2020-08-21
winki 2020-08-19