나는 이것을 redhat 7에서 시도했습니다.
systemctl list-unit-files --type=service|grep iptables
or
systemctl list-unit-files --type=service|grep firewall
그러나 아무런 출력도 얻지 못합니다. 이는 iptables/firewall이 systemctl에서 제거되었음을 의미합니까?
또한 Linux Redhat에 iptables가 설치된 것을 보았습니다.
# rpm -qa |grep iptables
iptables-1.4.21-16.el7.x86_64
답변1
주문하다
systemctl list-unit-files --type=service|grep iptables
iptables-services가 설치되지 않았기 때문에 iptables가 표시되지 않습니다!
iptables 서비스를 설치하려면 다음을 실행해야 합니다.
yum install iptables-services
yum install iptables-services
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package iptables-services.x86_64 0:1.4.21-16.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================================================
Installing:
iptables-services x86_64 1.4.21-16.el7 updates 50 k
Transaction Summary
================================================================================ ================================================================================
Install 1 Package
Total download size: 50 k
Installed size: 24 k
Is this ok [y/d/N]: y
Downloading packages:
iptables-services-1.4.21-16.el7.x86_64.rpm | 50 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : iptables-services-1.4.21-16.el7.x86_64 1/1
Verifying : iptables-services-1.4.21-16.el7.x86_64 1/1
Installed:
iptables-services.x86_64 0:1.4.21-16.el7
Complete!
이제 systemctl이 그것을 보여줍니다 - :)
# systemctl list-unit-files --type=service|grep iptables
iptables.service disabled