OPNsense Forum

English Forums => Virtual private networks => Topic started by: yeraycito on April 01, 2021, 03:27:21 PM

Title: Wireguard+Adguard
Post by: yeraycito on April 01, 2021, 03:27:21 PM
1 - I have installed wireguard following this tutorial https://homenetworkguy.com/how-to/configure-wireguard-opnsense/  without putting any dns server in the Local section of the wireguard configuration.

2 - I have installed the Adguard plugin according to this tutorial https://forum.opnsense.org/index.php?topic=22162.msg85979;boardseen#new

3 - I use Nextdns

4 - On an Android phone I install wireguard

Problems:

- Without setting dns servers in the wireguard server/client configuration the connection is perfect but looking at the Adguard logs I do NOT see the mobile connection. If I enter NextDNS via the web (not Adguard), these records do appear.

- If in the wireguard server/client configuration I set the dns servers 192.168.1.1 when I look at the logs of the Adguard plugin, the mobile connection does appear. However, although the connection is perfect, I don't have internet on my mobile.
If I remove the dns from the wireguard configuration I have internet on my mobile but the records do NOT appear in the Adguard plugin, they DO appear on the NextDNS website.

Title: Re: Wireguard+Adguard
Post by: Mar16 on April 12, 2021, 05:57:22 PM
Hi Yeraycito,

Were you able to solve the problem, I seem to be having the same issue. If I have adguard plugin running I am to access the LAN, but no internet.

If I disable the adguard plugin and use unbound dns, I am able to access the internet.
Title: Re: Wireguard+Adguard
Post by: yeraycito on April 13, 2021, 06:19:20 PM
Hello, the problem is not solved. If you activate the dns in the wireguard configuration with adguard activated there is no internet connection. However, if you do not activate the dns in the wireguard configuration there is an internet connection without problems but no records appear in adguard.
Title: Re: Wireguard+Adguard
Post by: Mar16 on April 21, 2021, 03:36:44 AM
Ok, thanks. I had a spare raspberry pi so I am running adguard home on it now so I can have the ad blocking on wireguard.
Title: Re: Wireguard+Adguard
Post by: fktkjdz on April 25, 2021, 12:27:06 PM
I had the same problem.
I had internet again when I entered the Wireguard server address as DNS in the clients
Title: Re: Wireguard+Adguard
Post by: yeraycito on April 25, 2021, 06:40:20 PM
Problem solved.      Configuration in Opnsense:

1 - VPN - Wireguard - Local:

Tunnel Adress 10.0.0.1/24    ( example )

Dns Server: EMPTY

2 - Firewall - Rules - WG:  Add rule:

Action: Pass         tcp: ipv4       Protocol: any       Source: WG net        Destination:  any

3 - Firewall - Rules - Wireguard: Add rule:

Action: Pass         tcp: ipv4       Protocol: any       Source: WireGuard net        Destination:  any

4 - Smartphone client wireguard:

Edit configuration: DNS servers: 10.0.0.1
Title: Re: Wireguard+Adguard
Post by: liliumhyu on June 27, 2022, 11:49:58 PM
To those who have successfully got a handshake (a number other than 0) under VPN / Wireguard / Handshakes but have issues with DNS (I was getting DNS_PROBE_POSSIBLE in the browser) make sure that the DNS servers field on the Wireguard android app has the same IP as the IP under VPN / Wireguard / Local  - Tunnel Addresses column (without / CIDR).
Title: Re: Wireguard+Adguard
Post by: MarshallCS on July 11, 2022, 04:18:11 PM
Thank you Thank you Thank you!
Title: Re: Wireguard+Adguard
Post by: Mario_Rossi on December 23, 2023, 08:56:28 PM
Thanks for the info.
Now I have my android cell constantly connected with wireguard to the home opn and clean navigation without using particular apps and also bypassing YouTube/Chrome advertisements.