Centos close firewall command

CentOS6 turn off the firewall with the following command:

// temporarily close
service iptables stop
// disable startup
chkconfig iptables off

CentOS7 turn off the firewall with the following command:

// temporarily close
systemctl stop firewalld
// disable startup
systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

 

If iptables-service is installed, you can also use the following command:

yum install -y iptables-services
//close the firewall
service iptables stop
Redirecting to /bin/systemctl stop iptables.service //check firewall status service iptables status
Redirecting to /bin/systemctl status iptables.service iptables.service - IPv4 firewall with iptables Loaded: loaded (/usr/lib/systemd/system/iptables.service
; disabled; vendor preset: disabled) Active: inactive (dead)

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325079502&siteId=291194637