tags: Linux server network operation netfilter linux
[root@test ~]# service iptables save
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
[root@test ~]# service iptables restart
Redirecting to /bin/systemctl restart iptables.service
Failed to restart iptables.service: Unit not found.
[root@test ~]# sudo ufw status
Sudo: UFW: Can't find the command
[root@test ~]# systemctl stop firewalld
[root@test ~]# systemctl mask firewalld
Created symlink from /etc/systemd/system/firewalld.service to /dev/null.
[root@test ~]# yum install iptables-services
Loaded plug-in: FastestMirror, Langpacks
Determining fastest mirrors
* base: mirror.bit.edu.cn
* extras: mirror.bit.edu.cn
* updates: mirrors.bfsu.edu.cn
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/3): extras/7/x86_64/primary_db | 222 kB 00:00:00
(2/3): base/7/x86_64/primary_db | 6.1 MB 00:00:00
(3/3): updates/7/x86_64/primary_db | 3.7 MB 00:00:01
Solving dependencies
-> Inspection of affairs
---> Software package iptables-services.x86_64.0.1.4.21-35.el7 will be installed
-> Processing dependencies iptables = 1.4.21-35.EL7, it is required by the package iptables-service-1.4.21-35.el7.x86_64
-> Inspection of affairs
---> Software package iptables.x86_64.0.1.4.21-28.el7 will be upgraded
---> Software package iptables.x86_64.0.1.4.21-35.el7 will be updated
-> Solve dependencies
Dependency resolution
======================================================================================================================================================
Package architecture version source size
======================================================================================================================================================
Installing:
iptables-services x86_64 1.4.21-35.el7 base 52 k
Update for dependencies:
iptables x86_64 1.4.21-35.el7 base 432 k
Professional summary
======================================================================================================================================================
Install 1 package
Upgrade (1 dependent package)
Total download: 485 k
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for base
(1/2): iptables-services-1.4.21-35.el7.x86_64.rpm | 52 kB 00:00:00
(2/2): iptables-1.4.21-35.el7.x86_64.rpm | 432 kB 00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.9 MB / s | 485 KB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updated: iptables-1.4.21-35.el7.x86_64 1/3
I am installed: iptables-service-1.4.21-35.el7.x86_64 2/3
Clean up: iptables-1.4.21-28.el7.x86_64 3/3
Verification: iptables-services-1.4.21-35.el7.x86_64 1/3
Verification: iptables-1.4.21-35.el7.x86_64 2/3
Verification: iptables-1.4.21-28.el7.x86_64 3/3
It has been installed:
iptables-services.x86_64 0:1.4.21-35.el7
As a dependent is upgraded:
iptables.x86_64 0:1.4.21-35.el7
complete!
[root@test ~]# systemctl enable iptables
Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.
[root@test ~]# systemctl start iptables
[root@test ~]#
Centos7 default firewall is not iptables, but FireWalle. This situation may be that the iptables firewall is not installed. CentOS7 default firewall is not iptables, but Firewalle. This situation may ...
Restart the oracle database: /*oracle and tomcat are installed on different servers*/ Log in with the oracle user, check the running status of the oracle listener, and view it through the lsnrctl stat...
Project scene: CentOS7 closes the firewall appearance: Failed to stop iptables.service: Unit iptables.service not loaded. Problem Description: CentOS7 executes: Service iptables stops appears when the...
Today, when the firewall was turned off, Unit iptables.service could not be found. After inspection, it was found that it was caused by the centos version, so I made this document to record Let’...
original: Execution in CentOS7 Failed to start iptables.service: Unit iptables.service failed to load: No such file or directory. Firewalls are managed by firewalld in CentOS 7 or RHEL 7 ...
In CentOS 7 or Fedora or RHEL 7 firewall to manage the firewalld Add to Reload View delete ...
Firewall Command (iptables) command # systemctl restart iptables.service failure Redirecting to /bin/systemctl restart iptables.ser The firewall related instruction error is performed under Linux: 1, ...
For the first time, when using CentOS 7, when the firewall is configured, the iptables service cannot be used, and sometimes the command can succeed, sometimes it is not, especially those written, and...
The following error message: With CentOS 6 has been used to it, I did not getting it. ": Unit iptables.service failed to load:. No such file or directory Failed to restart iptables.service" ...