IPTables Firewall
IPTables Service
sudo service iptables status
(can use status, start, stop, restart, save)
Reset IPTables
sudo iptables --flush
Only temporarily clears iptables settings Will be restored when service is restarted
sudo iptables --flush
sudo service iptables save
or
sudo iptables-save
Makes empty iptables settings permanent
Open a port
sudo vi /etc/sysconfig/iptables
Add the following before any REJECT lines
-A INPUT -p tcp -m tcp --dport <port number> -j ACCEPT
Save the changes
sudo service iptables save
Check for “LISTENING” status
netstat -a | grep <port number>
netstat -a | grep 389
netstat -a | grep <group>
netstat -a | grep ldap
Install IPTables-Service
yum install iptables-services -y
Stop Firewall
systemctl stop firewalld
systemctl mask firewalld
mask hides the service unmask makes the service visible
Disable Firewall
systemctl disable iptables.service
systemctl status iptables.service