iptables - Setting Up HTTP Services
One common task when setting up a new HTTP server is to configure iptables to allow traffic to your HTTP server. The commands below will allow traffic on ports 80 and 443. You may need to adjust the 5 and 6 values to your environment - these are appropriate for a clean CentOS 6.0 installation.
sudo iptables -L -v sudo iptables -I INPUT 5 -p tcp --dport 80 -j ACCEPT sudo iptables -I INPUT 6 -p tcp --dport 443 -j ACCEPT sudo /sbin/service iptables save sudo iptables -L -v