Skip to content

SnipIT No 6: Allow HTTP through CentOS firewall


SnipIT is a series of short blogs containing useful information in an easily digestible format.

With a fresh install of CentOS, the firewall prevents http and https traffic.

To test that it is the firewall preventing access to the web server disable the firewall:

sudo systemctl stop firewalld

Then try browsing to the servers IP address for a remote machine.

Re-enable the firewall:

sudo systemclt start firewalld

To enable traffic we need to add two exceptions:

sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https

Then we restart the firwall:

firewall-cmd –reload

Browsing to the server from a remote web browser should now show the Apache “test” page.


From → Unix/Linux

Leave a Comment

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: