欢迎光临
AK的小站-记录生活的点滴

纯ipv6鸡配置ipv4(接入ipv4控制)

首先:系统需为Debian或者Ubuntu20

一:DNS设置

vi /etc/resolv.conf

将nameserver修改为:

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

二:Warp安装 – 上IPv4地址

首先安装一些必要依赖

apt update
apt install curl sudo lsb-release -y

添加 back­ports 源,并安装wireguard

echo "deb http://deb.debian.org/debian $(lsb_release -sc)-backports main" | sudo tee /etc/apt/sources.list.d/backports.list
sudo apt update
sudo apt install net-tools iproute2 openresolv dnsutils -y
sudo apt install wireguard-tools --no-install-recommends

然后使用go语言编译的内核

curl -fsSL git.io/wireguard-go.sh | sudo bash

安装wgcf【第三方注册器】,注册并生成配置

curl -fsSL git.io/wgcf.sh | sudo bash
wgcf register  选择yes,直接回车
wgcf generate

修改配置

vim wgcf-profile.conf
[Interface]
PrivateKey = xxx
Address = 172.16.0.2/32
Address = fd01:5ca1:ab1e:89f5:9dfa:759c:9348:13e6/128
DNS = 1.1.1.1
MTU = 1280
[Peer]
PublicKey = xxx
AllowedIPs = 0.0.0.0/0
AllowedIPs = ::/0
Endpoint = engage.cloudflareclient.com:2408
  • 上面第五行DNS改成:DNS = 2606:4700:4700::1111
  • 删除第十行 AllowedIPs = ::/0,否则Warp会托管ipv6
  • 修改第十一行为 Endpoint = [2606:4700:d0::a29f:c001]:2408

最后:复制启用配置

sudo cp wgcf-profile.conf /etc/wireguard/wgcf.conf
sudo systemctl start wg-quick@wgcf
sudo systemctl enable wg-quick@wgcf
echo 'precedence  ::ffff:0:0/96   100' | sudo tee -a /etc/gai.conf
赞(0) 请喝奶茶
未经允许不得转载:吾爱AK-哇咔咔AK » 纯ipv6鸡配置ipv4(接入ipv4控制)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章对你有用,奖励一杯奶茶给我也是可以滴(o゚▽゚)o

微信扫一扫打赏