We can use iptables, service, and chkconfig commands to enable and disable firewall in Centos.
iptables is an administration tool for IPv4 packet filtering and NAT.
service is a command to run a System V init script. It is used to save, stop, and start services.
chkconfig command is used to update and query runlevel information for system service. It is a system tool for maintaining the /etc/rc*.d hierarchy. We use this tool to disable firewall service at boot time.
Now we’re going to disable the firewall.
First login as the root user.
Next enter the following three commands to disable firewall.
# service iptables save
# service iptables stop
# chkconfig iptables off
If you are using IPv6 firewall, enter:
# service ip6tables save
# service ip6tables stop
# chkconfig ip6tables off