First go to Hurricane Electric Free IPv6 Tunnel Broker to register, click Create Regular Tunnel after login , follow the prompts to create and
open Tunnel Details and select Example Configuration, as shown below

Choose the system to use and follow the prompts
IPv4 priority (optional)
By default, if there is an IPv6 address in the Linux host, the IPv6 channel will be used first. For example, the source dns resolution of debian will return the AAAA record (IPv6) by default. To use IPv4 connection priority without disabling IPv6, you need to modify gai.conf The configuration file makes it effective.
vi /etc/gai.conf
Uncomment the following line
precedence ::ffff:0:0/96 100
note
Some VPS, such as Bandwagon ‘s KVM series, also need to modify the /etc/sysctl.conf
file
vi /etc/sysctl.conf
Add these three lines
net.ipv6.conf.all.disable_ipv6 = 0 net.ipv6.conf.default.disable_ipv6 = 0 net.ipv6.conf.lo.disable_ipv6 = 0
Finally restart