setting IPTables

sudo iptables -I INPUT -p tcp –dport [Port] -j ACCEPT

service iptables restart

service ip6tables restart


Having trouble starting/restarting httpd (apache)

do you have trouble like this?


[root@mail ~]# sudo service httpd start
Starting httpd: (13)Permission denied: make_sock: could not bind to address [::]:8888
(13)Permission denied: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs


You’ve most likely got SELinux enabled and in “enforcing” mode.

You can disable it with:

sudo setenforce 0

You can then start apache as normal with

sudo service httpd start

If you want to disable SELinux permanently, edit /etc/selinux/config and change SELINUX=enforcing to SELINUX=disabled

If you want to continue using SELinux, you’ll need to fix your config by adding access to the port, with something along the lines of

sudo semanage port -a -t http_port_t -p tcp 8888 <- tentative