service iptables status to view the status of the firewall
Turn on the firewall service iptables start
service iptables stop turn off the firewall
service iptables restart restart firewall
Firewall open specific ports
File / etc / sysconfig / iptables
Add Port
Restart the firewall
Prohibit access to certain IP
iptables -A INPUT -p tcp -s 192.168.1.2 -j DROP
-s parameter is the source (ie 192.168.1.2)
Later he refused or DROP