CentOS 7 iptables replaced with firewalld
Posted: Tue Jul 22, 2014 1:44 am
This should help anyone else out who has this problem.
I installed Nagios Core 4.0.7 on CentOS 7 (basic / minimum install).
After Core installs I needed to open the firewall ports to allow port 80 inbound.
Before CentOS 7 I did this:
The first command worked but the second command reported this:
I needed to do this instead:
You need to do both commands because the first one is for the running environment and the second one makes it permanent when the server reboots.
I installed Nagios Core 4.0.7 on CentOS 7 (basic / minimum install).
After Core installs I needed to open the firewall ports to allow port 80 inbound.
Before CentOS 7 I did this:
Code: Select all
iptables -I INPUT -p tcp --destination-port 80 -j ACCEPT
/sbin/service iptables save
I found on CentOS 7 that iptables has been replaced with firewalld.The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
I needed to do this instead:
Code: Select all
firewall-cmd --zone=public --add-port=http/tcp
firewall-cmd --zone=public --add-port=http/tcp --permanent