Per impostazione predefinita, RHEL 7 utilizza il servizio FirewallD per garantire la sicurezza della rete. FirewallD deve essere arrestato e disabilitato quando si utilizza il servizio iptables:
# systemctl stop firewalld.service # systemctl disable firewalld.service
# systemctl enable iptables.service # systemctl start iptables.service
Il servizio iptables è ora fornito da un pacchetto separato chiamato iptables-services:
# yum info iptables-services Name : iptables-services Arch : x86_64 Version : 1.4.21 Release : 13.el7 Size : 23 k Repo : installed From repo : anaconda Summary : iptables and ip6tables services for iptables URL : http://www.netfilter.org/ License : GPLv2 Description : iptables services for IPv4 and IPv6 : : This package provides the services iptables and ip6tables that have been split : out of the base package since they are not active by default anymore.
Potrebbe essere necessario installare il pacchetto iptables-services per primo:
# systemctl -a|grep iptables ● iptables.service not-found inactive dead iptables.service
Arrestare e disabilitare prima il servizio firewalld.
# systemctl stop firewalld.service # systemctl disable firewalld.service Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
Se provi ad abilitare il servizio iptables, fallirebbe.
# systemctl enable iptables.service Failed to execute operation: No such file or directory
Installa i servizi-iptables pacchetto.
# yum install iptables-services -y
Abilita il servizio iptables :
# systemctl enable iptables.service Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.
Avvia il servizio iptables :
# systemctl start iptables.service #