banner
年糕

年糕日记

此站为备份站点,最新文章请访问 oior.net
telegram
email

Accessing IPV4 using pure IPV6 with NAT64

Introduction#

NAT64 is a form of network address translation (NAT) that facilitates communication between IPv6 and IPv4 hosts through an IPv6 transition mechanism. The NAT64 gateway is a translator between the IPv4 and IPv6 protocols, ^^requiring at least one IPv4 address and an IPv6 subnet with a 32-bit address space. The "well-known prefix" reserved for this service is 64:ff9b::/96.

IPv6 clients embed the IPv4 address they wish to communicate with in the host portion of the IPv6 subnet, creating an IPv6 address with embedded IPv4 (32-bit address space within the IPv6 subnet), and send packets to the generated address. The NAT64 gateway then creates a mapping between the IPv6 and IPv4 addresses, which can be manually configured or automatically determined.

For more details, please visit Wikipedia:

https://en.wikipedia.org/wiki/NAT64

https://zh.wikipedia.org/zh-cn/NAT64

Why do we need NAT64?#

  • Almost all modern IP devices support IPv6, but there are still many older devices that only support IPv4. We need a way to connect these devices through an IPv6 network.
  • As IPv4 addresses become depleted, IPv6 addresses will be more widely assigned to new devices; however, most accessible content on the Internet is still IPv4.
  • Many resources are stored on IPv4 network addresses, and IPv6 networks do not provide direct access to IPv4 network resources. Using NAT64 services to achieve address translation is a good choice.

Usage of NAT64 service#

Modify /etc/resolv.conf and set the DNS in the format nameserver 2001:67c:2b0::4 one line at a time.

Before using, please backup /etc/resolv.conf with the command cp /etc/resolv.conf /etc/resolv.conf.bak

Finnish servers:

2001:67c:2b0::4
2001:67c:2b0::6

Source: https://www.trex.fi/2011/dns64.html

One-line command: echo -e "nameserver 2001:67c:2b0::4\nnameserver 2001:67c:2b0::6" > /etc/resolv.conf

German servers:

2a01:4f8:c2c:123f::1
2a00:1098:2c::1
2a01:4f9:c010:3f02::1

Source: https://nat64.net/

One-line command: echo -e "nameserver 2a01:4f8:c2c:123f::1\nnameserver 2a00:1098:2c::1\nnameserver 2a01:4f9:c010:3f02::1" > /etc/resolv.conf

Then you will find that previously inaccessible ipv4 websites can now be accessed directly.

# Partial public nat64
2a01:4f9:c010:3f02::1
2001:67c:2b0::4
2001:67c:2b0::6
2a09:11c0:f1:bbf0::70
2a01:4f8:c2c:123f::1
2001:67c:27e4:15::6411
2001:67c:27e4::64
2001:67c:27e4:15::64
2001:67c:27e4::60
2a00:1098:2b::1
2a03:7900:2:0:31:3:104:161
2a00:1098:2c::1
2a09:11c0:100::53
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.