Ideal AdGuardHome + WireGuard configuration


Recommended Posts

I've been trying to run most services on Unraid for ease of backup and to centralize everything. The ones that are causing me some grief are AdGuardHome for DNS and WireGuard for VPN.


I love the WireGuard plugin for Unraid and it is my preference to run this.

 

If I run AdGuardHome on a Rpi4, everythings works great, but then I need to keep the Pi4 running and maintained (not that big a deal really). 

 

If I spin up an AdGuardHome docker container, I need to run with a custom IP on br0 so that it can have free access to DNS type ports. When using a custom IP, WireGuard peers cannot access it. I've seen some complicated posts about setting up static routes on my router, or running docker containers in a VLAN. I can do this since I have a Unifi setup but the instructions aren't working for me.

 

The other option is to run AdGuard in a VM on the unraid server.

 

What is everyone's thought on this?

Link to comment
  • 3 weeks later...

I've had exactly the same problem, and after hours of looking scouring the Internet for answers I finally found a solution that works for me.

 

In the section 'Complex Networks' in the top post of the link above it is described what settings to use when using a custom IP for a Docker container. Basically, you have to ensure these three things:

  • In the WireGuard tunnel config (Settings > VPN Manager), make sure that Local server uses NAT is set to No (this setting can be found by toggling Advanced in the top right corner)
  • Add a static route in your router from the WireGuard Local tunnel network pool to the IP of your Unraid server (the default pool for WireGuard on Unraid is 10.253.0.0/24) For me the router settings look like this:

image.png.b145e25a96bc6c44f0d5a30ad5420757.png

  • In your Docker settings (Settings > Docker), make sure that Host access to custom networks is set to Enabled

After restarting the WireGuard tunnel with these settings I was finally able to connect to Adguard Home using its local IP address through the WireGuard tunnel. Good luck, hopefully it will work for you too!

  • Thanks 1
Link to comment
  • 7 months later...

I've been using Wireguard lately. Now trying to add AdGuard home and it's having issues working at all. 

1. Br0 custom port in AdGuard does not work at all and fails... if i adjust the Docker settings to allow custom ports then it brings down wireguard and my remote access

2. When i use Host for the AdGuard Docker, I can get it to start.  but in the settings for the initial AdGuard setup it is having problems with "binding" toi port 80 and 53, saying they are already in use.  I'm sure that has to do with WireGuard, correct? 

3. I don't think I can use any other ports than 80 and 53 because my router won't allow that DHCP/DNS setup?

4. When I disable NAT in the VPN Settings in Unraid it just makes wireguard vpn not work at all. (I'm trying to do this remotely since I'm away now for a bit)

 

Any ideas?

Edited by Kenny111
Link to comment
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.