IPv6 NAT6 和端口转发?
我的本地网络 IPv6 NAT 就像:
------------------------ ---------------------------------------
| Web Server: | | Router OpenWrt: |
| dda1:aaaa:bbbb::221/64| <=> | IPv6 ULA prefix: dda1:aaaa:bbbb::/48 |
| | | br-lan: dda1:aaaa:bbbb::1/60 |
------------------------ | wan6: 2400:xxxx:yyyy::15/64 |
---------------------------------------
如果我有一个 Web 服务器 http://[dda1:aaaa:bbbb::221]:8080
,我如何配置 ip6table
(或其他东西)放在路由器上,以便其他人可以通过 http://[2400:xxxx:yyyy::15]:48080
访问它?
有什么方法可以在 LuCI WebUI 中配置它吗?
多谢。
My local network IPv6 NAT is like:
------------------------ ---------------------------------------
| Web Server: | | Router OpenWrt: |
| dda1:aaaa:bbbb::221/64| <=> | IPv6 ULA prefix: dda1:aaaa:bbbb::/48 |
| | | br-lan: dda1:aaaa:bbbb::1/60 |
------------------------ | wan6: 2400:xxxx:yyyy::15/64 |
---------------------------------------
If I have a web server http://[dda1:aaaa:bbbb::221]:8080
, how do I configure the ip6table
(or something else) on the router so that other people can access it by http://[2400:xxxx:yyyy::15]:48080
?
And is there any way to configure it in the LuCI WebUI?
Thanks a lot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信您想要实现的目标已经在本页的 OpenWrt 文档中提到: NAT6 和 IPv6 伪装。
注意:我不确定此 Wiki 页面是否已针对新版本的 OpenWrt 进行了更新。我自己没有尝试过,不确定它是否按预期工作。
我将简要概述上一页中的步骤,这里也一样:
kmod-ipt-nat6
包。masq6
选项并将其设置为1
。Allow-ICMPv6-Forward
防火墙规则,因为它不再有任何意义。现在,成功实施 NAT6 后,继续设置端口转发,这与 IPv4 NAT 的设置方式非常相似:
如果这不起作用,您可以创建一个简单的脚本< /a>,使用 iptables 命令创建 DNAT 规则,并将其包含在防火墙的配置中。
I believe what you are trying to achieve is already mentioned in the OpenWrt docs on this page: NAT6 and IPv6 masquerading.
Note: I am not sure if this Wiki page has been updated for the newer releases of OpenWrt. I haven't tried it myself, and not sure if it works as expected.
I will briefly outline the steps from the above page, here as well:
kmod-ipt-nat6
package.masq6
option and set it to1
.Allow-ICMPv6-Forward
firewall rule as it no longer makes any sense.Now, once NAT6 is successfully implemented, go on to setup port forwarding very similar to how it's done for IPv4 NAT:
dest_ip
option for the port redirect rule. I believe you'll have to use the CLI for this, since LuCI (at least in 21.02 at the time of writing) will not let you specify an IPv6 address there.If that doesn't work, you can create a simple script, that creates the DNAT rule using the
iptables
command, and include it in your firewall's configuration.