VPS Warp IPV6

1.Add Backports Repository

apt install curl lsb-release -y

echo "deb http://deb.debian.org/debian $(lsb_release -sc)-backports main" | tee /etc/apt/sources.list.d/backports.list

apt update

2. Add Internet Tool Packages

apt install net-tools iproute2 openresolv dnsutils -y

3. Add Wireguard Tools

apt install wireguard-tools --no-install-recommends

4. Check Core Version, If Its Number Later Than 5.6, This Step Can Be Ignored.

uname -r

apt -t $(lsb_release -sc)-backports install linux-image-$(dpkg --print-architecture) linux-headers-$(dpkg --print-architecture) --install-recommends -y

reboot 

5. Generate WireGuard Configuration File

curl -fsSL git.io/wgcf.sh | bash 

wgcf register    
                   
wgcf generate    

6. Edit Configuration File

nslookup engage.cloudflareclient.com         # check the current IP, e.g.:  162.159.192.1

vi /root/wgcf-profile.conf

[Peer]

PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=

AllowedIPs = 0.0.0.0/0                        # delete this line

AllowedIPs = ::/0

Endpoint = engage.cloudflareclient.com:2408   # replace engage.cloudflareclient.com with 162.159.192.1

:wq                                           # save and quit

7. Copy Wgcf.conf to Specific Path

cp wgcf-profile.conf /etc/wireguard/wgcf.conf

8. Test IPV6 Works Well or Not With the Fellowing Options

wg-quick up wgcf

# IPv4 Only VPS

curl -6 ip.p3terx.com

# IPv6 Only VPS

curl -4 ip.p3terx.com

ip a

ping6 google.com

ip -6 addr show scope global

wg-quick down wgcf

9. Start & Enable Wireguard

sudo systemctl start wg-quick@wgcf 

sudo systemctl enable wg-quick@wgcf

# the following 1 step can replace the above 2 stpes

sudo systemctl enable --now wg-quick@wgcf

# vice versa

sudo systemctl disable --now wg-quick@wgcf

10. Modify Proxy Configuration File (Replace Your Own Outbounds With the Following Part)

"outbounds": [
    {
      "tag":"IP4_out",
      "protocol": "freedom",
      "settings": {}
    },
    {
      "tag":"IP6_out",
      "protocol": "freedom",
      "settings": {
        "domainStrategy": "UseIPv6"
      }
    }
  ],
  "routing": {
    "rules": [
      {
        "type": "field",
        "outboundTag": "IP6_out",
        "domain": ["geosite:netflix","geosite:openai"] // websites via IPV6, can add or reduce options
      },
      {
        "type": "field",
        "outboundTag": "IP4_out",
        "network": "udp,tcp"
      }
    ]
  }
}
Scroll to Top