Skip to content

Network Manager - OpenVPN, DNS Domain support

My new job uses OpenVPN to provide secure access to their private network. They also make heavy use of the dns domain search so that you only have to type “wiki” to get to their wiki. It turns out that the Open VPN plugin for network manager ignores the “dns-domain” setting, this means I have to manually change /etc/resolv.conf (to add the needed “search” section) after every connection.

This annoyed me enough that I have developed a small patch for the plugin which fixes support. I’ve submitted the patch to Ubuntu, hopefully it will get included soon. In the meantime I have attached the patch and the deb for Ubuntu Gusty.

Edit: This patch has been included in Ubuntu Gusty!

{ 3 } Comments

  1. Joel Williams | September 8, 2007 at 4:23 pm | Permalink

    If you’ve ever found resolv.conf to be too simplistic, check out the script that I once wrote. It gives you a way to set name servers and search domains based on (in my examples) the host specified in the command line or user, but could easily be made to check for the presence of a VPN. It’s delightfully evil.

  2. David | October 12, 2007 at 11:30 pm | Permalink

    This is the first attempt I’ve come across that even attempts to correct this glaring shortcoming. I’ve been trying to achieve this behavior with the pptp NetworkManager plugin, which I understand is, at least loosely, based on the OpenVPN plugin for NM. I don’t have the programming skills to transpose this patch and apply it to the pptp plugin source. Would this be a simple thing for you to do? Do you know if anyone else has already done this?

  3. mithro | October 15, 2007 at 2:29 pm | Permalink

    Sorry, I don’t have the time to try and fix this for you (plus I don’t have access to a PPTP server). I would recommend logging a bug report here, the bug shouldn’t be all that hard for them to fix.

Post a Comment

Your email is never published nor shared. Required fields are marked *