Sorry, I was called away.
I want to use my VPN (proton vpn) but i don’t know how to use my local AdGuard Home instance as its DNS
I don’t think Proton’s official app supports custom DNS? I may be wrong though, in which case just point it to the local IP of the server running AdGuard Home (eg 192.168.1.3). If not, generate a WireGuard config from Proton’s dashboard on the website (in your account) then import it to the official WireGuard app. That will allow you to specify DNS.
i’m trying to keep a cache of local DNS queries so pages load faster, but the DNS queries and most of the sites ( youtube, twitter … ) are blocked by my government, So ADguard Home should go through a VPN.
Using an encrypted upstream in AdGuard Home should help. Have you tried that? For example tls://one.one.one.one
, tls://dns.quad9.net
, https://dns.quad9.net/dns-query
, or https://dns.cloudflare-dns.com/dns-query
or even quic://dns-unfiltered.adguard.com
? You should really generate SDNS stamps for those addresses, to avoid the need for a ‘bootstrap DNS’ (i.e. clearnet DNS with no encryption) to resolve the endpoints at the start of each session. For example, the SDNS stamp for AdGuard unfiltered (the last one I just linked) is sdns://BAcAAAAAAAAADTk0LjE0MC4xNC4xNDAAGmRucy11bmZpbHRlcmVkLmFkZ3VhcmQuY29t
. You can verify that, or generate more for other providers, HERE.
You shouldn’t need a VPN for those to work (hopefully), but if your government is really on their game they will have blocked those well-known endpoints.
First, I need a VPN to access blocked sites, Change my location and IP Address.
Then, I need Adguard home to block Ads and cache DNS queries so pages load faster.
That much makes sense. Pointing your VPN client to the local AdGuard instance will achieve what you wish. You can also just use your provider’s built in adblocking DNS if they offer it (Mullvad, OVPN, maybe Proton?, NordVPN, PIA etc etc).
I don’t want to use encrypted DNS as upstream because i don’t want sites to know my location and ip address.
Encrypting the upstream DNS won’t change what sites see. I assume you mean ‘use encrypted DNS as upstream without also using a VPN’. In which case, see what I already wrote. Using both is good. Still encrypt your DNS - more layers are better, so encrypted DNS over VPN is better than plain DNS over VPN.
Right now, i’m using adguard DNS, openDNS, quad9 and a few more as upstream dns. I have linux server on VirtualBox.
That’s fine. So all you need to do is either instruct Proton’s client to use your AGH IP (if it allows it, but I don’t think they do) or, as I said, grab a WireGuard config and use the official app. Just insert DNS = (AGH IP)
into the config in place of whatever DNS Proton put in there automatically, then import it to the WireGuard app and connect. You’re done!