-
-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DietPi-Software | WireGuard: Use "DNS = 10.9.0.1", if local DNS is loopback IP/localhost #2482
Comments
@swrobel Indeed we get the DNS address from the nameserver entry of the server machine. If it resolves DNS requests itself, e.g. Pi-hole installed or dnsmasq, the entry is the loop back address which of course is wrong for clients. Solution code side is to check, if the DNS entry is loopback and in case replace it with the VPN sever IP as you did. I guess with the iptables rules in place, the local server IP (from local network, not WireGuard interface) should work as well? |
You are indeed correct, it works with the local server ip |
@swrobel NB: |
PR up to solve this: https://github.com/Fourdee/DietPi/pull/2526 |
Hello, |
@niwre2019 |
I've done the steps, but the problem persists. A correct connection to WireGuard is established, but the DNS resolution no longer exists. I'm back to version 6.21.1 and everything works fine again. In addition, the following note, the call from external sites through the browser works fine, but access to local IP addresses in my network 192.168.xxx.xxx does not work on the direct IP address and DNS resolution. |
Required Information
Additional Information (if applicable)
Steps to reproduce
/etc/resolv.conf
containsnameserver 127.0.0.1
)Expected behaviour
/etc/wireguard/wg0-client.conf
containsDNS = 10.8.0.1
Actual behaviour
/etc/wireguard/wg0-client.conf
containsDNS = 127.0.0.1
Extra details
See this line: https://github.com/Fourdee/DietPi/blob/dev/dietpi/dietpi-software#L10055
I would submit a PR but I'm not very good at shellscripting and believe this conditional should be a quick fix for someone knowledgeable.
The text was updated successfully, but these errors were encountered: