|
本帖最后由 jiawang 于 2023-11-16 17:53 编辑
使用systemctl status iptables.service结果●
iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2023-04-22 17:50:53 CST; 23s ago
Process: 24118 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=1/FAILURE)
Main PID: 24118 (code=exited, status=1/FAILURE)
Apr 22 17:50:53 instance-7uo5iwn4 systemd[1]: Starting IPv4 firewall with iptables...
Apr 22 17:50:53 instance-7uo5iwn4 iptables.init[24118]: iptables: Applying firewall rules: Bad argument `–state'
Apr 22 17:50:53 instance-7uo5iwn4 iptables.init[24118]: Error occurred at line: 13
Apr 22 17:50:53 instance-7uo5iwn4 iptables.init[24118]: Try `iptables-restore -h' or 'iptables-restore --help' for more information.
Apr 22 17:50:53 instance-7uo5iwn4 iptables.init[24118]: [FAILED]
Apr 22 17:50:53 instance-7uo5iwn4 systemd[1]: iptables.service: main process exited, code=exited, status=1/FAILURE
Apr 22 17:50:53 instance-7uo5iwn4 systemd[1]: Failed to start IPv4 firewall with iptables.
Apr 22 17:50:53 instance-7uo5iwn4 systemd[1]: Unit iptables.service entered failed state.
Apr 22 17:50:53 instance-7uo5iwn4 systemd[1]: iptables.service failed.
上面的错误是在启动ipv4 firewall时失败,可尝试关闭firewalld服务在重启iptables:
# service iptables save
# systemctl stop firewalld -- 关闭firewalld服务
# systemctl disable firewalld --设置开机禁用firewalld
# systemctl start iptables -- 启动iptables
# systemctl status iptables --确认iptables状态
# systemctl enable iptables -- 设置iptables开机启动
# systemctl status firewalld --确认firewalld服务
|
|