0

I just installed a Centos7 distribution on my server.

I came from Centos6, and I read that iptables utility has been replaced by firewalld and services utility by systemctl.

So I try to get my firewall status (systemctl status firewalld) but I get following output:

● firewalld.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)

If I try systemctl status iptables I get the same output:

● iptables.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)

Can I deduce that my firewall is down? To check it I launch an old iptables -P OUTPUT DROP command : my ssh connection doesn't respond anymore (without having restarted any services).

So iptable seems to be running, but how can I manage it if it's not detected by systemctl? (for instance to save my configuration). And does it make sense that firewalld was not the default firewall installed?

Update 1:

  • journalctl -u firewalld.service gives no result (only start and stop log's datetime), journalctl -u iptables.service too.
  • The only occurence about firewall I found in journalctl is : Feb 22 19:48:49 myhostname.host.net kernel: Bridge firewalling registered. I don't know about bridge firewalling...
  • We previously see that adding a rule to iptables was imediatly taken in account without restarting any service (very strange isn't it?), and if I run a ps aux | grep iptables command I should get the iptables process, but I get nothing. I really wonder what kind of firewall is running...
3
  • Strange. I recently installed 3 CentOS 7 servers (2 with GUI, 1 without) and all of them have the firewalld running and the iptables not running. Could you run journalctl -u firewalld.service to see if the firewall tries to start at least? What kind of install did you perform?
    – Zina
    Feb 22, 2016 at 19:22
  • @Zina My install is provided by my host (it's a VPS), but it should be a minimalist install, so I expect default Centos' configuration. I update my question with some more informations. Feb 22, 2016 at 20:24
  • 1
    Searching the net I found this. Seems that you have to install firewalld as the image provided is probably also a stripped down one. One of my installations was a minimal with networking enabled and it has the firewalld service.
    – Zina
    Feb 23, 2016 at 9:51

1 Answer 1

0

Your output is showing Loaded: not-found (Reason: No such file or directory) for both firewalld and iptables. This probably means that you don't have either installed.

The firewalld package contains the file /usr/lib/systemd/system/firewalld.service. The iptables-services package contains the file /usr/lib/systemd/system/iptables.service. Pick the one you want and install it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .