Book Image

Troubleshooting CentOS

By : Jonathan Hobson
Book Image

Troubleshooting CentOS

By: Jonathan Hobson

Overview of this book

Table of Contents (17 chapters)
Troubleshooting CentOS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Removing Firewalld and returning to iptables


Firewalld may not be to everyone's liking and you may prefer iptables. So, on a final note, if you ever find yourself in a situation where you do not want to use Firewalld, you can return to iptables easily.

To begin with, you should disable Firewalld like this:

# systemctl disable firewalld
# systemctl stop firewalld

You should then install and configure iptables by typing:

# yum install iptables-services
# touch /etc/sysconfig/iptables
# touch /etc/sysconfig/ip6tables

Now, start the iptables service with the following commands:

# systemctl start iptables
# systemctl start ip6tables
# systemctl enable iptables
# systemctl enable ip6tables

From this point onwards, you now have iptables as your firewall service of choice. However, just before you go, it is probably a good idea to reboot your server in order for the kernel to account for the new configuration.

To do this, type:

# reboot