我有以下设置:
- 本地 DNS 服务器(未绑定)正在监听
10.10.20.1
- wireguard 服务器
10.10.0.1/24
- 开启 wireguard 客户端
10.10.0.2/32
,DNS指向10.10.20.1
我可以连接到服务器并且可以看到对等端:
peer: ..redacted
endpoint: 127.0.0.1:33218
allowed ips: 10.10.0.2/32, 10.10.20.1/32
latest handshake: 1 minute, 19 seconds ago
transfer: 247.87 KiB received, 571.86 KiB sent
persistent keepalive: every 25 seconds
一旦连接,我可以在终端上发出 dig 命令并且它们会返回 ok:
dig u/10.10.20.1 reddit.com
;; Warning: query response not set
; <<>> DiG 9.10.6 <<>> u/10.10.20.1 reddit.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27447
;; flags: rd ra ad; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;reddit.com. IN A
;; ANSWER SECTION:
reddit.com. 0 IN A 151.101.129.140
reddit.com. 0 IN A 151.101.193.140
reddit.com. 0 IN A 151.101.65.140
reddit.com. 0 IN A 151.101.1.140
;; Query time: 87 msec
;; SERVER: 10.10.20.1#53(10.10.20.1)
;; WHEN: Thu Aug 11 21:18:35 EEST 2022
;; MSG SIZE rcvd: 103
一旦连接,ifconfig 就会显示我的界面:
utun7: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1420
options=6463<RXCSUM,TXCSUM,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM>
inet 10.10.0.2 --> 10.10.0.2 netmask 0xffffffff
但我的浏览器无法解决任何问题,我的系统上的任何其他软件也没有。有趣的是,我有一个装有 Windows 机器的 VM...一旦连接,互联网就可以正常工作。任何帮助都非常感谢。