3

I'm trying to directly use iptables instead of firewalld to manage firewall rules. However systemctl start iptables prints:

[root@centos-new ~]# systemctl start iptables
Failed to issue method call: Unit iptables.service failed to load: No such file or directory.

I'm running a newly installed CentOS 7 so it is hardly possible to let something important be deleted by me. What could be the possible problem?

10

firewalld is installed by default on CentOS7 systems. You need to disable it and install iptables instead. These steps should do it:

systemctl mask firewalld
systemctl stop firewalld
yum install iptables-services
systemctl enable iptables
systemctl start iptables

Optionally, if you want to handle IPv6 as well:

systemctl enable ip6tables
systemctl start ip6tables

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.