在 CentOS 系统中,要重启 iptables 服务,您可以使用以下命令:
sudo systemctl stop iptables
sudo systemctl start iptables
sudo systemctl enable iptables
sudo systemctl status iptables
请注意,CentOS 7 及更高版本默认使用 firewalld 作为防火墙。如果您使用的是 firewalld,您需要使用以下命令来重启服务:
sudo systemctl stop firewalld
sudo systemctl start firewalld
sudo systemctl enable firewalld
sudo systemctl status firewalld