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

Posted December 9, 2016 7.4k views
DNSVPNUbuntu 16.04

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 :)

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.

Submit an Answer
3 answers

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

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

Belgian ones are mine :


how about:

push “redirect-gateway def1 bypass-dhcp”