You are not logged in.

#1 2012-11-11 18:38:28

dac
Member
Registered: 2012-11-11
Posts: 2

openvpn DNS resolv.conf resolvconf.conf final tweak help needed.

I've followed the archwiki and have a working openvpn client that I start from the command line. I just need help tweaking one final setting.

As per archwiki I'm using these lines in my openvpn config to call a script at /usr/share/openvpn/update-resolv-conf to set DNS nameservers.

script-security 2
up /usr/share/openvpn/update-resolv-conf
down /usr/share/openvpn/update-resolv-conf

This is working well and the script is adding the following to /etc/resolv.conf

# Generated by resolvconf
nameserver 127.0.0.1 (dnsmasq)
nameserver 199.0.0.1 (mymadeupvpnaddress)
nameserver 192.168.1.1 (home router)

Ok so my question... how can I not have the 192.168.1.1 address added when using openvpn?

So to be clear when using just my normal home setup I get this >>>

# Generated by resolvconf
nameserver 127.0.0.1 (dnsmasq)
nameserver 192.168.1.1 ( home router)

Great, this is what I want.

Then I start openvpn from cli and get this >>>

# Generated by resolvconf
nameserver 127.0.0.1 (dnsmasq)
nameserver 199.0.0.1 (mymadeupvpnaddress)
nameserver 192.168.1.1 (home router) <<< dont want this nameserver here

Ok this does work but I want just the following nameservers to be added leaving the home router 192.168.1.1 out of the list so it will look like this >>>

# Generated by resolvconf
nameserver 127.0.0.1
nameserver 199.0.0.1

What's the best way to set this up? Does it involve changing script at /usr/share/openvpn/update-resolv-conf or maybe adding a setting in /etc/resolvconf.conf? I had a look at the dns script and also the man pages for resolvconf resolvconf.conf but got stuck as to what to do. So decided to post here for help.

Hope I've made myself clear and would be happy to give anymore information as needed. Thanks.

Offline

Board footer

Powered by FluxBB