Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using Network Manager on Ubuntu 12.10 to connect to an openvpn server. The connection works without problems. However, when I connect, I would like to change my default DNS server to a server on the vpn network. That way I can use domain names that are only defined on the vpn network. Is there a way I can make this automatic with Network Manager?

I can also change settings on the openvpn server if that is the way I need to go.


share|improve this question
This should be done on the server. See similar question. –  Rajesh Nov 7 '12 at 16:24
That looks like it will do the trick. I will try it out. Thanks! –  Daniel Nov 7 '12 at 16:34

2 Answers 2

While this is something that is usually done on the server as mentioned in the comments, there might be cases where you only want to use the VPN's DNS for queries inside of the VPN. In that case you'd probably want to run a lightweight DNS daemon on your system and instruct it where to send what query. If you are in several VPNs at once this is basically a must.

share|improve this answer
up vote 0 down vote accepted

As per Rajesh, adding an option to the server seemed the best way to go.
See this question for complete details

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.