tags: notes linux centos Operation and maintenance
Centos7 has replaced iptables, systemctl replaces Service with FireWallD.
First check your own virtual machine version is 6 or 7
I started to put the CentOS6 command to 7 on 7, and the following error occurred.
View the firewall status
Redirecting to /bin/systemctl status iptables.service
Unit iptables.service could not be found.

In fact, CentOS7's command has been updated.
1, check the firewall status
systemctl status firewalld.service
![[ , , (img-nJepPqPe-1642944315805)(../../source/images/Unit%20iptables.service%20could%20not%20be%20found/image-20220123211937798.png)]](https://img-blog.csdnimg.cn/a291fd62ba89493aa05e7b715b46ec15.png)
If you have a green label "Active (Running)", the firewall is turned on.
2. Open firewall
systemctl start firewalld.service
![[ , , (img-L3EtnCwx-1642944315806)(../../source/images/Unit%20iptables.service%20could%20not%20be%20found/image-20220123212305542.png)]](https://img-blog.csdnimg.cn/192a6b6f220c4c689a9f8270be50a549.png)
3. Turn off the firewall
systemctl stop firewalld.service
And check the firewall status
systemctl status firewalld.service
![[ , , (img-aiWnNADb-1642944315806)(../../source/images/Unit%20iptables.service%20could%20not%20be%20found/image-20220123212401591.png)]](https://img-blog.csdnimg.cn/a8e49b5bf85c4975b5a1b5837e0370c8.png)
Reference: How can i use iptables on centos 7? [closed]...
The default firewall under Centos7 is Firewall, which replaces the previous iptables. Firewall has two methods of graphical interface management and command line management. This article briefly intro...
wrong reason: I just installed the Ubuntu 18.04 system, but failed to connect to the server with Xshell, because the server has not enabled the remote connection function. Command input: systemctl sta...
When Linux checks the status of the ssh service, the message "Unit sshd.service could not be found" is displayed. 1. Check whether ssh and sshd are installed: ps -e|grep ssh 2. It shows that...
Today, I rented a few new cloud servers, configured the environment, and first set up a wave of Zookeeper clusters. Like the previous machine, turn off the firewall service iptables stop first, and su...
When the firewall is closed, it appears: Solution: yum install iptables-services In fact, after centos7 is based on iptable systemctl stop firewalld...
Pit when configuring fastDfs: restart firewall on CentOs7 or Reference blog: Difference between CentOs7 and CentOs6 The default firewall for centos7 is firewalld firewall, not using iptables, so you m...
Original address: Execute in CentOS7 Error: Redirecting to /bin/systemctl restart iptables.service Failed to restart iptables.service: Unit not found. The reason is because CentOS7 uses firewal...
Because virtual machines under use win install Linux. But the win is can ping of Linux. But using the browser method Linux service win the next time, can not access. Suspected to be a firewall problem...
The following error message: (1) Close firewalld: systemctl stop firewalld systemctl mask firewalld (2) use the iptables service: 1. Installation iptables-services: yum install ipt...