Modify FW rules

The iptables firewall will need to be modified to allow connections to the Apache web server that will be installed.
Edit your /etc/sysconfig/iptables file with your favorite text editor. Modify the file as outlined below by adding the black line inbetween the already existing grey lines.

It’s assumed that iptables is still in its default configuration.
-A INPUT -m state –state NEW -m tcp -p tcp –dport 22 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
-A INPUT -j REJECT –reject-with icmp-host-prohibited

Restart the iptables firewall by typing service iptables restart at the shell prompt as shown below.

[root@cacti-server ~]# service iptables restart
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]

Advertisements