I've enabled iptables in systemd with:
systemctl enable iptables
but after restart when I try service iptables status
, it shows:
# service iptables status
Redirecting to /bin/systemctl status iptables.service
iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled; vendor preset: disabled)
Active: inactive (dead)
But when I start it manually systemctl start iptables
, it starts normally.
I'm running Fedora 22.
Best Answer
Both Fedora 22 and Centos 7 is shipped with firewalld as default firewall. I got a the same behavior when testing on a Centos7 when having firewalld and iptables enabled at the same time.
Check to see if
systemctl list-unit-files|grep firewalld
is enabled if so disabled it with:# systemctl disable firewalld rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service' rm '/etc/systemd/system/basic.target.wants/firewalld.service'
Now iptables should start at boot.