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

关于您博客中的WAN_INPUT-->ACCEPT 内网主机运行STUN测试的结果会始终是Symmetric NAT该如何理解呢 #34

Open
sandianyue opened this issue Oct 2, 2020 · 0 comments

Comments

@sandianyue
Copy link

您好 拜读了您的博文 👍 对最后的FAQ字段说法 不太理解

使用了Linux设备作为NAT网关,内网主机运行STUN测试的测试结果是Port Restricted Cone NAT,而不是Symmetric NAT。
这是因为Stun和netfilter对映射要素的理解存在差异造成的,具体可参考 这篇文章。但不能因此就断定linux的SNAT不是Symmetric。实际上,这是因为linux NAT网关上存在这条iptables规则导致的(OpenWRT发行版的firewall默认存在这条规则,虽然是在INPUT的子链中):iptables -t filter -A INPUT -i eth0 -j REJECT #或者INPUT的policy为REJECT
如果删除了这条规则(在OpenWRT上则是在Firewall设置中,将wan zone的Input策略从reject改为accept),内网主机运行STUN测试的结果会始终是Symmetric NAT。

按照我的理解似乎来回只跟preroutting forward postroutting 三个链有关啊 烦请带佬看到后解惑一番 感谢!

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

1 participant