Avoid DNS Leaks on a OpenVPN server (ubuntu 16.04 distro)

Hello !

So i was in need for a personal VPN and i heard of the VPS-OpenVPN thing, i decided to create one, i don’t know anything in linux.

I followed this tutorial :

and everything works ! the only thing that bothers me is that when i go on to test my VPN, it does work but when i try the extended test i see a lot of DNS that aren’t forwarding via the VPN and are just my actual DNS servers.

it doesn’t really bothers me since my IP changed and stuff but is there something i can do to really forward all the traffic to the VPN and get none of my country DNS used anymore ?

hope you understood what i’m asking.

regards :)


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

how about:

push “redirect-gateway def1 bypass-dhcp”

Belgian ones are mine :


do you have these lines (uncommented) in your server.conf:

push “dhcp-option DNS” push “dhcp-option DNS”