Nov 8, 2018

Firewall Configuration of Oracle Linux

RHEL / CentOS / Oracle Linux 7 iptables was replaced with firewalld

$ sudo -i systemctl  status firewalld.service
firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
   Active: active (running) since Thu 2014-09-18 17:36:50 EDT; 5 days ago
 Main PID: 819 (firewalld)
   CGroup: /system.slice/firewalld.service
           └─819 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Sep 18 17:36:50 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.

See also:

How to configure firewall on CentOS /Oracle Linux/ Red Hat 7

To disable iptables and open all ports, enter the following commands as the root user:

# service iptables stop
# chkconfig iptables off

Open the required ports by using the iptables command as the root user:

# iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

When all the ports have been opened, save the iptables configuration:

# service iptables save