Code: Select all
systemctl stop firewalld
systemctl disable firewalld
yum -y install iptables-services
systemctl enable iptables
systemctl start iptables
Code: Select all
/sbin/iptables-save > /etc/sysconfig/iptables
systemctl restart iptables
chkconfig --list:
Code: Select all
htb 0:off 1:off 2:on 3:on 4:on 5:on 6:off
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Code: Select all
iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled; vendor preset: disabled)
Active: active (exited) since Fr 2018-07-06 23:34:00 MSK; 12h ago
Main PID: 2334 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/iptables.service
jul 06 23:34:00 srv2 systemd[1]: Starting IPv4 firewall with iptables...
jul 06 23:34:00 srv2 iptables.init[2334]: iptables: Applying firewall rules: [ OK ]
jul 06 23:34:00 srv2 systemd[1]: Started IPv4 firewall with iptables.