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
DifficultyEasy (rss)
Root privilegesYes
RequirementsNone
Time1m
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.

ADVERTISEMENTS

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 SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig 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 VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.