Ubuntu – How to make Ubuntu never use specified DNS server? (DNSLeak issues)


Im using VPN and dnsleaktest.com shows me that it discovered vpn dns and my isp dns.
I want to avoid using isp dns when using vpn.

I found I can use prepend domaine name servers in /etc/dhcp/dhclient.conf but all it does is give the psecified dns a priority so it doesnt disable isp dns.

Best Answer

  • You can also reject the obtained IP with

    # /etc/dhcp/dhclient.conf 

    or leave out domain-name-servers

    request subnet-mask, broadcast-address, time-offset, routers,

    see also man dhclient.conf.