1

我正在尝试使用 DNS 记录,而不是在配置文件 /etc/wireguard/wg0.conf 中硬编码的公共 IP 地址

我遵循了下面的示例并执行了它,但出现以下错误

sh[1227]: /usr/share/wireguard-tools/examples/reresolve-dns/reresolve-dns.sh: line 46: : No such file or directory
Starting Reresolve DNS of all WireGuard endpoints...
wireguard_reresolve-dns.service: Main process exited, code=exited, status=1/FAILURE
wireguard_reresolve-dns.service: Failed with result 'exit-code'.
Failed to start Reresolve DNS of all WireGuard endpoints.

我不确定从哪里引发此错误,因为文件路径正确且文件存在

~# ls /usr/share/wireguard-tools/examples/reresolve-dns/reresolve-dns.sh
/usr/share/wireguard-tools/examples/reresolve-dns/reresolve-dns.sh

结果,wireguard仍然没有用我在DNS服务中更改的新IP更改对等IP https://wiki.archlinux.org/index.php/WireGuard#Endpoint_with_sharing_IP

我不确定上面的wiki是否真的有效,因为我在github中找到了另一个wireguard工具repo,它正在做同样的事情,但即使这样也不起作用,下面是这个repo的链接 https://github.com/ WireGuard/wireguard-工具

同时在下面发现的 repo 在动态 IP 更改方面做得更好,但我认为这个 repo 仍在开发中,因为当我尝试安装它时,它给了我以下错误 https://github.com/WireGuard/wg -动态的

~/wg-dynamic# make install
make: *** No rule to make target 'wg', needed by 'install'.  Stop.

我希望如果有人在上面尝试过,哪个正在工作,我应该采取哪些补救措施才能使其正常工作,因为以上两个 URL 没有给出任何错误,但 IP 不会更改为 DNS 中更改的那个服务器。

4

1 回答 1

0

示例脚本需要一个wireguard 配置文件作为参数(在第46 行,如错误消息指出的那样)。尝试添加 eg/etc/wireguard/wg0.conf或您想要使用的任何配置文件。

于 2020-09-01T15:02:03.393 回答