1
2
3
4
| [root@localhost ~]# systemctl stop firewalld.service #停止firewall
[root@localhost ~]# systemctl disable firewalld.service #禁止firewall开机启动
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
|
1
2
3
4
| [root@localhost ~]# yum install iptables-services #安装
[root@localhost ~]# vim /etc/sysconfig/iptables #编辑防火墙配置文件
[root@localhost ~]# systemctl restart iptables.service #最后重启防火墙使配置生效
[root@localhost ~]# systemctl enable iptables.service #设置防火墙开机启动
|