Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nft 添加 ipset 错误 #1745

Open
cresky-github opened this issue May 30, 2024 · 5 comments
Open

nft 添加 ipset 错误 #1745

cresky-github opened this issue May 30, 2024 · 5 comments

Comments

@cresky-github
Copy link

问题现象
不是所有nft动作都失败,但遇有失败

nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:File exists
nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:ip is invalid
nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:No such file or directory
nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:Resource temporarily unavailable

目前,只发现有4 种情况

这4 种错误,是什么意思 啊?

@PikuZheng
Copy link
Contributor

nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:File exists

nft存在,但尝试重复创建。这个应该没影响

nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:ip is invalid

nft是ipv4表,但尝试添加ipv6记录?或者ip/子网 不匹配

nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:No such file or directory

nft不存在,但尝试添加记录

nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:Resource temporarily unavailable

猜测是没权限(nft需要root

以上都是我的猜测(平时用ipt不用nft

@cresky-github
Copy link
Author

error:File exists
对我来说,很重要。
因为,要拿去分流的,查nftset了,确实没记录。

error:ip is invalid
应该是测速失败造成的,应该是不能访问的那种IP,或者是 timeout。对我没什么实质影响。

@cresky-github
Copy link
Author

貌似返回多个IP时,
最后一个IP发生概率 更大。

@PikuZheng
Copy link
Contributor

error:File exists
对我来说,很重要。
因为,要拿去分流的,查nftset了,确实没记录。

也可能ipset里已经有对应的ip(段)了。比如存在192.168.0.0/16,那么添加192.168.1.0/24就会报File exists

@cresky-github
Copy link
Author

error:File exists
对我来说,很重要。
因为,要拿去分流的,查nftset了,确实没记录。

也可能ipset里已经有对应的ip(段)了。比如存在192.168.0.0/16,那么添加192.168.1.0/24就会报File exists

再去验证一下这说法。
再折腾折腾,看看能否解决问题。
如若不能,只能另想它法。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants