i fresh installed CentOS 7 in a OVH VPS. but when i ran the command firewall-cmd
i got this:
-bash: firewall-cmd: command not found
so i was looking how resolve that and i saw that basically i needed to install it.
So I was trying to fully disable iptables with: systemctl mask iptables
but i received a error that i strange because i was running as root:
Failed to execute operation: Access denied
I tried the following commands too before:
[root@vps****** ~]# systemctl status iptables
● iptables.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
and
[root@vps****** ~]# systemctl stop iptables
Failed to stop iptables.service: Unit iptables.service not loaded.
so i thought that iptables was not installed as well but when i run the command iptables --version
i get iptables v1.4.21
so i guess it it installed...
So, what is causing iptables not be recognized with systemctl and why firewallD is not installed as default?
some people have similar problem because OpenVZ, but OVH don't use OpenVZ anymore...
system info:
cat /proc/sys/kernel/osrelease
3.10.0-327.13.1.el7.x86_64
--
cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)
I think I remember having seen something peculiar on OVH's VPS. In my case, if I remember well, everything was compiled into the kernel -- there were no kernel modules loaded dynamically.
In your case you don't need to bother disabling iptables -- I'm not even sure that you can, since firewalld uses iptables underneath. Simply install and configure firewalld and you'll be fine.