我正在尝试在RHEL7上使用iptables。 我已经执行了以下操作:
systemctl mask firewalld systemctl stop firewalld yum install iptables-services systemctl enable iptables systemctl start iptables
但最后一行错误:
Job for iptables.service failed because the control process exited with error code. See "systemctl status iptables.service" and "journalctl -xe" for details. journalctl -u service-name.service -- No entries --
和journalctl -xe
Jan 13 12:30:03 localhost.localdomain systemd[1]: Unit iptables.service entered failed state. Jan 13 12:30:03 localhost.localdomain systemd[1]: iptables.service failed. Jan 13 12:30:03 localhost.localdomain polkitd[10240]: Unregistered Authentication Agent for unix-process:27798:561438909 (system bus name :1.22082, object path /org/freedesktop/P lines 1222-1263/1263 (END)
这只告诉我它失败了,而不是原因,我不知道unix-process的unregistered authentication agent意味着什么,或者它是相关的。 我相信这是因为它总是遵循iptables的错误行。 但我不知道这是什么意思,或者具体如何补救。 不是哪个是原因,哪个是效果。
另外 :
sudo iptables -S -P INPUT ACCEPT -P FORWARD ACCEPT -P OUTPUT ACCEPT sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: permissive Mode from config file: enforcing Policy MLS status: enabled Policy deny_unknown status: allowed Max kernel policy version: 28
和iptables-restore挂起。
这其他职位没有帮助 。
解决:
我不确定究竟是什么原因,处理locking或其他什么,但经过几次重新启动和运行iptables-restore ,我现在能够得到服务启动。
我如何获得iptables服务启动?
简短的回答我知道,但我有一个类似的问题,重新启动修复它。 该服务在启动时启动,然后我可以停止并正常启动。