I am running CentOS 7 VPS which I purchsed preconfigured with iptables installed, but I didn't check this at first. I know CentOS 7 "should" be firewalled, so I installed firewalld and no error presented itself.
Later on, when I tried to start the daemon via systemctl start firewalld
, the program crashed shortly afterwards without showing any error.
I ran systemctl status firewalld
to make sure the firewall was running and got the following output:
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Tue 2019-11-19 08:35:39 EST; 1min 35s ago
Docs: man:firewalld(1)
Process: 27356 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
Main PID: 27356 (code=exited, status=0/SUCCESS)
Nov 19 08:35:37 vps.blabla.com systemd[1]: Starting firewalld - dynamic ....
Nov 19 08:35:38 vps.blabla.com systemd[1]: Started firewalld - dynamic f....
Nov 19 08:35:39 vps.blabla.com firewalld[27356]: WARNING: ipset not usabl...
Nov 19 08:35:39 vps.blabla.com firewalld[27356]: ERROR: Failed to load nf...
modprobe: ERROR: could n...
modprobe: ERROR: Error r...
Nov 19 08:35:39 vps.blabla.com firewalld[27356]: ERROR: Raising SystemExi...
Hint: Some lines were ellipsized, use -l to show in full.
I dug into it using systemctl status firewalld -l
and got the following:
* firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Tue 2019-11-19 08:35:39 EST; 13min ago
Docs: man:firewalld(1)
Process: 27356 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
Main PID: 27356 (code=exited, status=0/SUCCESS)
Nov 19 08:35:37 vps.blabla.com systemd[1]: Starting firewalld - dynamic firewall daemon...
Nov 19 08:35:38 vps.blabla.com systemd[1]: Started firewalld - dynamic firewall daemon.
Nov 19 08:35:39 vps.blabla.com firewalld[27356]: WARNING: ipset not usable, disabling ipset usage in firewall.
Nov 19 08:35:39 vps.blabla.com firewalld[27356]: ERROR: Failed to load nf_conntrack module: modprobe: ERROR: could not find module by name='nf_conntrack'
modprobe: ERROR: could not insert 'nf_conntrack': Function not implemented
modprobe: ERROR: Error running install command for nf_conntrack
modprobe: ERROR: could not insert 'nf_conntrack': Operation not permitted
Nov 19 08:35:39 vps.blabla.com firewalld[27356]: ERROR: Raising SystemExit in run_server
Then I started to dig deeper and found that my server already had iptables installed and configured with some open ports and more. I assume that the error comes from the fact I have already have one firewall running. My research showed that people say these two firewalls in the same server may conflict.
The problem:
1) If I remove the firewalld (which, as pointed by many on the web, is newer and is the future), will it cause me to be "locked out"?
2) If I would like to remove the iptables and use firewalld, is it even possible to achieve similar configuration as in iptables without getting "locked out"?
Note: The only access I have to the server now is via SSH, and I am root user.
Thanks a lot