What is the command to turn off the firewall in centos?

coldplay.xixi
Release: 2021-02-24 16:59:21
Original
60389 people have browsed it

centos firewall shutdown command: 1. Temporarily shut down, the code is [systemctl stop firewalld]; 2. Disable startup, the code is [systemctl disable firewalld].

What is the command to turn off the firewall in centos?

The operating environment of this article: Windows7 system, centos6&¢os7 version, Dell G3 computer.

centos close firewall command:

CentOS6Use the following command to close the firewall,

//临时关闭 service iptables stop //禁止开机启动 chkconfig iptables off
Copy after login

CentOS7If you use the same command in CentOS7, an error will be reported.

stop iptables.service Failed to stop iptables.service: Unit iptables.service not loaded.
Copy after login

This is because the firewall uses firewalld by default after the CentOS7 version. Therefore, to turn off the firewall in CentOS7, use the following command,

//临时关闭 systemctl stop firewalld //禁止开机启动 systemctl disable firewalld Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Copy after login

Of course, if it is installediptables-service, you can also use the following command,

yum install -y iptables-services //关闭防火墙 service iptables stop Redirecting to /bin/systemctl stop iptables.service //检查防火墙状态 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)
Copy after login

Related free recommendations:Programming video course

The above is the detailed content of What is the command to turn off the firewall in centos?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!