提问人:Paiusco 提问时间:5/24/2023 更新时间:5/24/2023 访问量:242
firewalld 在使用 nftables 后端时抛出错误
firewalld throws an error when using nftables backend
问:
我正在将 firewalld 1.2.0 添加到我的 yocto 发行版中。 但是,每当我尝试使用调试消息启动它时(在删除 ipv6 规则后),我都会得到:
2023-05-24 12:40:54 DEBUG2: <class 'firewall.core.ipXtables.ip4tables'>: /usr/sbin/iptables-restore /run/firewalld/temp.5p25jbxq: 116
1: *security
2: -F
3: -X
4: -Z
5: COMMIT
6: *raw
7: -F
8: -X
9: -Z
10: COMMIT
11: *mangle
12: -F
13: -X
14: -Z
15: COMMIT
16: *nat
17: -F
18: -X
19: -Z
20: COMMIT
21: *filter
22: -F
23: -X
24: -Z
25: COMMIT
2023-05-24 12:40:54 DEBUG3: <class 'firewall.core.nftables.nftables'>: calling python-nftables with JSON blob: {"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"table": {"family": "inet", "name": "firewalld"}}}]}
2023-05-24 12:40:54 DEBUG1: Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/firewall/core/fw_transaction.py", line 116, in execute
self.fw.rules(backend_name, rules[backend_name])
File "/usr/lib/python3.10/site-packages/firewall/core/fw.py", line 1016, in rules
backend.set_rules(_rules, self._log_denied)
File "/usr/lib/python3.10/site-packages/firewall/core/nftables.py", line 360, in set_rules
raise ValueError("'%s' failed: %s\nJSON blob:\n%s" % ("python-nftables", error, json.dumps(json_blob)))
ValueError: 'python-nftables' failed:
JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"table": {"family": "inet", "name": "firewalld"}}}]}
2023-05-24 12:40:54 ERROR: 'python-nftables' failed:
JSON blob:
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"table": {"family": "inet", "name": "firewalld"}}}]}
与我看到的相关问题不同,这个问题没有提到具体的规则。有什么想法吗?
注意:如果我将配置更改为使用 iptables,那么一切正常。但是,由于 iptables 正在被弃用,我想坚持使用 nftables
注意:我基于这个问题:centos 8,firewalld 错误“COMMAND_FAILED:”python-nftables 失败”
答: 暂无答案
评论