大网数据广告活动
服务器运维问答

Can i use a proxy from ipv6 to ipv4

· 52CE 我爱测

Suppose i have an ipv6 internet address. Is it possible to connect to a ipv4 proxyserver. I have been trying this scenario from ipv4 which works perfectly, but not with ipv6. Could this be the cause?

问题原文

原帖链接 · David · CC BY-SA 4.0

Suppose i have an ipv6 internet address. Is it possible to connect to a ipv4 proxyserver. I have been trying this scenario from ipv4 which works perfectly, but not with ipv6. Could this be the cause?

已采纳解答

原帖链接 · hardillb · CC BY-SA 4.0

There are a number of approaches for running IPv6 only networks but still allowing access to services that are only available via IPv4.

If you want to use a HTTP proxy from a IPv6 only device to access IPv4 devices then the proxy device will need both an IPv4 and an IPv6 address (Dual Stack).

The more effective approach is to take a similar approach as most Home networks and use a form of NAT (Network Address Translation) as this allows all protocols to work, not just HTTP. This is called NAT64 which makes use of a single device at the edge of the network which translates requests from IPv6 to IPv4 and the responses back again.

To make this work you also need to re-map DNS look ups, because if a hostname only has IPv4 address then the IPv6 client won't know where to connect to. So this requires running a special DNS server (called DNS64).

The flow is as follows

  • Client looks up the IPv6 address of the service
  • If the DNS64 server can only find a IPv4 address is will pre-pend a specific IPv6 prefix to the address to build a full IPv6 address. The default prefix is 64:ff9b::/96.
  • The network is configured to route all addresses starting with this prefix to a specific machine at the edge of the network that also has a IPv4 connection.
  • This machine uses NAT64 to strip off the IPv6 prefix and translate the source address to it's IPv4 address (storing the original source IPv6 address in a lookup table.).
  • When the service replies the NAT64 device remaps the destination to the original IPv6 source address and re-applies the prefix to the source address.

I have a blog post with more details here.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-11-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。