Adblock work with openvpn?

hello, I have tp-link 1043nd v3 with LEDE firmware. I install adblock and openvpn on it but do not know how to get working adblock over openvpn? adblock working fine over local network....I think I need one command line in etc/config/openvpn but didn't find it on internet.....

announce the router's dns server to your clients, e.g.

[...]    
option 'server' '10.0.0.0 255.255.255.0'
option 'client_to_client' '1'
list 'push' 'redirect-gateway def1'
list 'push' 'dhcp-option DNS 192.168.1.1' # Change this to your router's DNS LAN IP Address
list 'push' 'route 192.168.1.0 255.255.255.0' # Change this to your network
[...]

i have this in my openvpn but still got ads over openvpn? can you write here how look correct config?

config openvpn 'myvpn'
option enabled '1'
option verb '3'
option port '1195'
option proto 'udp'
option dev 'tun'
option server '10.8.0.0 255.255.255.0'
option 'client_to_client' '1'
list 'push' 'redirect-gateway def1
list 'push' 'dhcp-option DNS 192.168.10.1'
option keepalive '10 120'
option ca '/etc/openvpn/ca.crt'
option cert '/etc/openvpn/my-server.crt'
option key '/etc/openvpn/my-server.key'
option dh '/etc/openvpn/dh2048.pem'

all day playing how to push DNS to openvpn to block ads....I will be very happy if someone can post here valid config.....

I am sure 192.168.10.1 is your routers LAN addres right?
If so try to add this line to your openvpn server config file
list 'push' 'route 192.168.10.0 255.255.255.0'

Today i was setting up my openvpn server on my LEDE router. I read many guides for security and they suggest not to have push or pull commands. I guess better way is to insert those settings in your client.conf file.

still didn`t solved how to block ads over OpenVPN...i need working config files here if someone using that....

anyone knows valid config? i didn`t solve my problem yet...:disappointed:

list 'push' 'route 192.168.1.0 255.255.255.0' # Change this to your network

can you tell me where to my network put this command?

Do you want path of file to put that command?

That's not correct. I already posted correct line for your config based on what i saw in this topic

add this line to your openvpn config

list 'push' 'route 192.168.10.0 255.255.255.0'

I add that line in etc/config/openvpn but nothing better....still got ads over openvpn....here is what i have in config file...

config openvpn 'myvpn'
option enabled '1'
option verb '3'
option port '1195'
option proto 'udp'
option dev 'tun'
option server '10.8.0.0 255.255.255.0'
option keepalive '10 120'
option 'client_to_client' '1'
list 'push' 'redirect-gateway def1'
list 'push' 'dhcp-option DNS 192.168.10.1'
list 'push' 'route 192.168.10.0 255.255.255.0'
option ca '/etc/openvpn/ca.crt'
option cert '/etc/openvpn/my-server.crt'
option key '/etc/openvpn/my-server.key'
option dh '/etc/openvpn/dh2048.pem'

Hey there.

Does adblock on your router work at all with non-VPN clients? Are you sure it is installed, turned on and properly configured?

When you do nslookup google.com on your client computer, what's the result? Chances are you're asking your VPN router, which indicates there's a problem with adblock. And chances are you're not asking your VPN router, which indicates your VPN is not working properly.

Can you do regular VPN traffic, like accessing any LAN comuter from your VPN client? Maybe you simply cannot reach your VPN routers internal interface?

Do you have firewall settings in place that prevent your VPN client to connect to your routers internal interface? I'm sure you need at least some "accept" rule for "from any host in VPN input to device (input)" on UDP port 53 to make DNS work.

Regards,
Stephan.

Just adjust these:

/etc/config/dhcp

 config dnsmasq
      option localservice '0'

/etc/config/openvpn

     list push 'dhcp-option DNS 10.8.0.1'

Hi
Is there any resolution to this?
i have 2 vlans, 1 with and 1 without vpn.
ad blocking works on the non vpn vlan, but not on the vpn vlan plus i am using custom dns servers to prevent dns leaks.

any help appreacited. ps i have tried all above to no success.

Thanks

Probably not the solution you're looking for, but I think ad blockers are better used in the browser, rather than on the router.

Install AdBlock or uBlock Origin add-ons for your browser and you're done.

Hi jwoods,
i understand what you are saying, but the reason i would like ads blocked on router level is so that it may block ads on all devices, windows/phones/tablets.
i have this working on the non vpn vlan, just need to try and get it to work on the vpn vlan.

Thanks for your reply though

Understand.

What do you use to block ads when the mobile devices are connected to another access point, such as at an airport or coffee shop?

That's why I a prefer browser-based solution.

i get your point, but i dont surf the web as rigorously out and about as i do at home.

Hi, I manage to get this sorted by getting dns servers from vpn provider that block ads.

thanks

1 Like