不幸的是,我不知道它什么时候停止工作,因为我把它用作一种“即发即弃”的解决方案。不久前我检查了一下gufw
,惊讶地发现我的机器已经没电了。
root@asus:/etc/ufw# dpkg -l | grep ufw
ii gufw 19.10.0-2
ii ufw 0.36-1
root@asus:/etc/ufw# dpkg -l | grep tables
ii iptables 1.8.4-11
ii iptables-dev:amd64 1.8.3-2
ii libnftables1:amd64 0.9.3-2
ii libnftnl11:amd64 1.1.5-1
ii libxtables-dev:amd64 1.8.4-1
ii libxtables12:amd64 1.8.4-1
ii nftables 0.9.3-2
我正在使用5.3.0-3-amd64
内核运行。
实际错误:
root@asus:/# ufw enable
ERROR: problem running ufw-init
Bad argument `DROP'
Error occurred at line: 4
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
Bad argument `-'
Error occurred at line: 4
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
iptables-restore: line 2 failed
Bad argument `-'
Error occurred at line: 3
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
Bad argument `-'
Error occurred at line: 3
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
Bad argument `-'
Error occurred at line: 3
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
Bad argument `-'
Error occurred at line: 3
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
iptables-restore v1.8.4 (nf_tables): Chain 'ufw-user-input' does not exist
Error occurred at line: 2
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
Bad argument `DROP'
Error occurred at line: 4
Try `ip6tables-restore -h' or 'ip6tables-restore --help' for more information.
Bad argument `-'
Error occurred at line: 4
Try `ip6tables-restore -h' or 'ip6tables-restore --help' for more information.
ip6tables-restore: line 2 failed
Bad argument `-'
Error occurred at line: 3
Try `ip6tables-restore -h' or 'ip6tables-restore --help' for more information.
Bad argument `-'
Error occurred at line: 3
Try `ip6tables-restore -h' or 'ip6tables-restore --help' for more information.
Bad argument `-'
Error occurred at line: 3
Try `ip6tables-restore -h' or 'ip6tables-restore --help' for more information.
Bad argument `-'
Error occurred at line: 3
Try `ip6tables-restore -h' or 'ip6tables-restore --help' for more information.
ip6tables-restore v1.8.4 (nf_tables): Chain 'ufw6-user-input' does not exist
Error occurred at line: 2
Try `ip6tables-restore -h' or 'ip6tables-restore --help' for more information.
Problem running '/etc/ufw/user.rules'
Problem running '/etc/ufw/user6.rules'
我还没有找到任何关于此问题的线索(有很多 ufw 问题,但不是这种类型)。我想知道这是否与内核的iptables
支持有关,事实上nftables
包以某种方式进入了已安装的包还是其他原因?如果我删除before*.rules
或,我会after*.rules
因此/etc/ufw
收到错误,脚本会查找这些文件。
我想知道是否有人遇到了同样的错误信息ufw enable
。目前我的ufw
处于非活动状态。
root@asus:/etc/ufw# lsmod | grep tables
ip6_tables 36864 0
ip_tables 32768 0
x_tables 49152 17 xt_conntrack,nft_compat,xt_LOG,xt_multiport,xt_tcpudp,xt_hashlimit,xt_addrtype,xt_recent,ip6t_rt,xt_comment,ip6_tables,ipt_REJECT,ip_tables,xt_limit,xt_hl,xt_MASQUERADE,ip6t_REJECT
nf_tables 163840 46 nft_compat,nft_counter,nft_chain_nat,nft_limit
nfnetlink 16384 4 nft_compat,nf_conntrack_netlink,nf_tables
答案1
我在 Debian 中遇到了同样的错误。
我根据此信息切换回了 iptables-legacy地点。