Adguard with OpenVPN

Hello friends,

recently I have setup a OpenVPN server which is using my AdGuard. both of these are on a same remote linux server and when I connect to OpenVPN using windows openvpn client app everything works fine and the adult sites which I blocked with adguard is blocked but when I use the same config on my openwrt router all sites are opening just as like I haven't configured any adguard.

can someone please tell me how should I fix this?

Temp remove OpenVPN out of the equation, does it work if you query the DNS directly.

The windows openvpn client usually will use a pushed dns server by the openvpn server.

The openvpn client on the router does not use the pushed dns server by default.

There are workarounds for that if this turns out to be your problem

If I turn the OpenVPN connection off it shouldn't use my Adguard DNS because I have only set my OpenVPN server to use my Adguard DNS. I haven't changed anything on my router.

I just want my router to behave like the windows OpenVPN client app, so when I'm connected to vpn use the same dns that my vpn provides which is my Adguard dns

You can use some form of scripting to deal with the pushed DNS server.
One example can be found here

But there are others too if you google a bit.
At least it will give you some idea how it works.

Some background about DNS:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.