-
Notifications
You must be signed in to change notification settings - Fork 56
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
Wireguard config error causes no outbound traffic #179
Comments
Hi @saghaulor, Your configuration looks correct. When you say there's no outbound traffic from a client on br666, have you tested if it's just DNS resolution or even pinging IPs? Can you try to |
Thanks for taking a look at my configs. I just tested on the device and it does seem to be a DNS issue. In a browser I loaded https://1.1.1.1 just fine, but https://ifconfig.co would not resolve. I'm not sure what the problem is, especially given that you said that my configs look correct. Is there anything else that I can try to address the issue? Thanks again for the help! |
Are you able to ping the pihole IP from the br666 client when the VPN is enabled? The issue is likely pihole itself is blocking inter-VLAN requests that are more than one hop away. In pihole web admin, go to Settings -> DNS -> under Inyergace Settings click "Permit all origins". Save then see if DNS is working from br666 clients on VPN. |
Thanks again for your help @peacey I changed the setting on my pi-hole to "Permit all origins" as you suggested. DNS is still not resolving for clients on br666. I also made sure to turn on standard mode instead of guest mode on br666, and made sure to disable a firewall rule that I had created to block LAN traffic from br666 to br0. It could still not resolve DNS. I also verified that clients on br666 were pointing to the pi-hole for DNS. I'm really at a loss for what could be the problem. |
I changed the vpn.conf to:
It still didn't work. Of note, when I try to use the VPN providers DNS in the wg0.conf, I receive an error. root@UDMPRO:/etc/split-vpn/wireguard/vpn# wg-quick up ./wg0.conf
Warning: `/data/split-vpn/wireguard/vpn/wg0.conf' is world accessible
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.2.0.2/32 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] resolvconf -a wg0 -m 0 -x
/usr/bin/wg-quick: line 32: resolvconf: command not found
[#] ip link delete dev wg0
root@UDMPRO:/etc/split-vpn/wireguard/vpn# I'm guessing this is because resolvconf can't be found? |
@saghaulor Your wireguard didn't start correctly (it ended up exiting due a configuration error and then reverting the changes). And the script didn't even start because of that. You shouldn't have the resolvconf line in your wg0.conf and the, can you please show me your wg0.conf? |
Thanks for looking again. I'm aware the VPN didn't start. I was trying anything I could think to figure out how to get the DNS to resolve. So I changed the config to use the DNS entry that was in the original config from the VPN provider. This is what I used when I received the error.
|
Oh I see. Sorry I was confused since I forgot I saw config from the first post. Yes that DNS line should be commented out or removed. Can you also please set DNS_IPV4_IP to empty ( Also the br666 network must not be a guest network (neither in LAN settings or WiFi if using a WiFi SSID) and cannot have any content filtering enabled on it in the settings. The UDM will try to reroute the DNS itself and mess things up if you enable that on the network. Do you have any client on br666 you can run ping and dig from so we can do some testing to a DNS IP (maybe a Mac or Linux host)? It would be ideal if you could run the following tests on a br666 client when the VPN is enabled: ping 1.1.1.1
dig @1.1.1.1 google.com A
ping 192.168.1.94
dig @192.168.1.94 google.com A This way we can see if you can ping the IP and then do a DNS lookup. At the least DNS to 1.1.1.1 should be working. |
Thanks again for the help. I verified that content-filtering is disabled on br666. I also changed the DNS_IPV4_IP entry to be empty. I attempted the ping and dig requests that you mentioned on a device connected to br666. ✗ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: icmp_seq=0 ttl=58 time=182.681 ms
64 bytes from 1.1.1.1: icmp_seq=1 ttl=58 time=181.479 ms
^C
--- 1.1.1.1 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 181.479/182.080/182.681/0.601 ms
✗ dig @1.1.1.1 google.com A
; <<>> DiG 9.10.6 <<>> @1.1.1.1 google.com A
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
✗ ping 192.168.1.94
PING 192.168.1.94 (192.168.1.94): 56 data bytes
64 bytes from 192.168.1.94: icmp_seq=0 ttl=64 time=2.272 ms
64 bytes from 192.168.1.94: icmp_seq=1 ttl=64 time=28.682 ms
^C
--- 192.168.1.94 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 2.272/15.477/28.682/13.205 ms
✗ dig @192.168.1.94 google.com A
; <<>> DiG 9.10.6 <<>> @192.168.1.94 google.com A
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3200
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 175 IN A 142.251.32.46
;; Query time: 47 msec
;; SERVER: 192.168.1.94#53(192.168.1.94)
;; WHEN: Sun May 28 09:52:18 PDT 2023
;; MSG SIZE rcvd: 55
✗ ping google.com
ping: cannot resolve google.com: Unknown host |
Did you ever get this figured out? I'm having this same exact problem. |
I had to enable systemd-resolved to get it to work. Works beautifully now. |
First, thank you for your amazing tool! I've been happily using it for a few years. However, I recently upgraded my UDM-Pro to 3.x release, and noted that Wireguard was available to use. I've read great things about it, so I wanted to give it a try. Unfortunately I couldn't get it to work and I'm afraid that I can't figure out what I'm doing wrong. I would really appreciate if you could point me in the right direction. Thank you in advance!
A little background:
I have a vlan configured (br666) and mapped to a port on the UDM-Pro that I used to forward all traffic for a device to my VPN. br666 is running DHCP and leasing addresses for 192.168.2.0/24
I have a pi-hole running on br0, DHCP is running and leasing addresses for 192.168.1.0/24, the pi-hole is on 192.168.1.94.
Below is my wg0.conf:
And here is my vpn.conf
The text was updated successfully, but these errors were encountered: