Help Setting OpenVPN Local DNS

edited May 2018 in Linux VPN Setup
Ubuntu 16.04 LTS
My goal is to connect to PIA using an OpenVPN client on linux, but I want DNS resolution via a local DNS sink (Pi-Hole) on my local network instead of using PIA DNS.

I've gotten OpenVPN set up with PIA credentials just fine on PC and my Pi-Hole, but when I check my network Connection Information I see that my Primary and Secondary DNS's are not my Pi Hole IP's. My ternary DNS shows 192.168.0.101 (Pi-Hole), but p/s are PIA DNS's.

I have already set up my pi-hole with OpenVPN configured with PIA, so (if I understand correctly) I shouldn't be leaking DNS queries once I get my PC pointed to my Pi-Hole (correct me if I'm wrong, please). Can anyone help me figure out what .conf file I need to modify, or what push/pull means, or whatever? I'm pretty lost.

Most of the information I've found is relating to pushing DNS information from an OpenVPN server, but I need to make changes as a client as I'm using PIA. Nothing I find seems to match my particular case, or if it does it's over my head and I can't recognize the information I need.

Comments

  • edited May 2018
    deleted
  • you can set filters in the OpenVPN config file to ignore the PIA nameservers being pushed to your client
  • edited May 2018
    You can also set the OpenVPN client configuration to use a specific DNS nameserver. When I was using OpenVPN, I had it set up so only PIA DNS was used. So with that, there should be a way to use only the DNS you specify.

    dhcp-option DNS w.x.y.z [Pi-Hole DNS IP address]

  • edited May 2018
    I think I figured it out.

    I had to change a setting in the [Network Connections> VPN Configuration > IPv4 Settings > Method] from "Automatic (VPN)" to "Automatic (VPN) address only."

    I was banging my head because none of the changes I was making to the .conf file were doing anything until this setting was changed. I'm not sure what all had to be done at this point because I've messed with a ton of stuff, but hopefully if someone finds this thread it'll be some help for them.
Sign In or Register to comment.