CentOS Open Port 80 and 443 in IPTables

The default CentOS installation does not have port 80 and 443 open, which you need for HTTP and HTTPS. To open up those ports and start serving website, add the following two lines in /etc/sysconfig/iptables

# -A RH-Firewall-1-INPUT -p tcp -m tcp –dport 443 -j ACCEPT
# -A RH-Firewall-1-INPUT -p tcp -m tcp –dport 80 -j ACCEPT

Restart iptables with this command: # service iptables restart

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: