分类: 网络与安全
2019-08-01 08:12:28
[root@Jaking ~]# service iptables save The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
[root@Jaking ~]# systemctl stop firewalld [root@Jaking ~]# systemctl mask firewalld Created symlink from /etc/systemd/system/firewalld.service to /dev/null.
[root@Jaking ~]# yum install -y iptables-services
[root@Jaking ~]# service iptables start Redirecting to /bin/systemctl start iptables.service
systemctl [start|status|stop|restart|enable] iptables
[root@Jaking ~]# systemctl enable iptables Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.
[root@Jaking ~]# iptables -F
[root@Jaking ~]# service iptables save iptables: Saving firewall rules to /etc/sysconfig/iptables: [ OK ] # 或者 [root@Jaking ~]# /usr/libexec/iptables/iptables.init save iptables: Saving firewall rules to /etc/sysconfig/iptables: [ OK ]