Restart Iptables Firewall On A CentOS Linux Server

I am a new CentOS Linux user and installed it on HP server. I updated /etc/sysconfig/iptables firewall config file. How do I restart a firewall on CentOS Linux version 5/6? How can I use command line to restart iptables on a CentOS server?

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements None
Est. reading time 1m
You can easily start or stop or restart firewall on a CentOS / Fedora / RHEL / Red Hat Linux server using the following syntax. You need to login as root user.

CentOS Linux restart iptables command

The syntax is as follows to restart an IPv4 iptables based firewall:
# service iptables restart

The syntax is as follows to restart an IPv6 iptables based firewall:
# service ip6tables restart

CentOS Linux stop iptables command

The syntax is as follows to stop an IPv4 iptables based firewall:
# service iptables stop

The syntax is as follows to stop an IPv6 iptables based firewall:
# service ip6tables stop

CentOS Linux start iptables command

The syntax is as follows to start an IPv4 iptables based firewall:
# service iptables start

The syntax is as follows to start an IPv6 iptables based firewall:
# service ip6tables start

CentOS Linux get status of iptables command

The syntax is as follows to status of an IPv4 iptables based firewall:
# service iptables status

The syntax is as follows to status of an IPv6 iptables based firewall:
# service ip6tables status


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 0 comments... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum