.png)
iptables 서비스 상태를 확인할 때 "활성"(종료)이라고 표시되는데, 이유와 해결 방법은 무엇입니까?
답변1
메시지는 정상입니다. 오류도 없고 수정할 것도 없습니다(마이그레이션하려는 경우 제외 firewalld
). iptables-restore
규칙이 로드된 후에는 방화벽 규칙을 유지할 필요가 없기 때문에 방화벽 규칙이 로드된 다음 종료 됩니다 . 이는 Type=oneshot
서비스에 일반적입니다.
[root@redacted ~]# systemctl status iptables
● iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled; vendor preset: disabled)
Active: active (exited) since Thu 2018-10-04 13:14:52 UTC; 1 weeks 4 days ago
[root@redacted ~]# wc -l /etc/sysconfig/iptables
822 /etc/sysconfig/iptables
[root@redacted ~]# systemctl list-unit-files | grep ipt
iptables.service enabled
[root@redacted ~]# systemctl list-unit-files | grep firew
firewalld.service disabled
살펴보면 /usr/lib/systemd/system/iptables.service
(결국 ) iptables-restore
./etc/sysconfig/iptables
( firewalld
뭔가 다르며 관련될 수도 있고 포함되지 않을 수도 있습니다.아니요위의 방화벽에서 이러한 명령과 출력은 다음 위치에서 복사됩니다.))