[nylug-talk] OpenVPN... Yeah or nay?

H. G. tekronis at gmail.com
Sat Sep 8 05:32:35 EDT 2007


On 9/8/07, VaibhaV Sharma <vaibhav at vaibhavsharma.com> wrote:
>
> My own laptop is a macbook pro and the only problem I have had is with the
> openvpn client not updating resolv.conf on connection.


OpenVPN does not by default update resolv.conf, as far as I know.
OpenVPN GUI will update your routing tables and DNS settings in Windows,
but in Linux, BSD and Mac OS X, only routing tables will get updated,
not resolv.conf.

Within your openvpn.conf, you need to set a script that can do this for you
to be triggered on connection.  OpenVPN will provide the pertinent
information (DNS gateway, etc.) as environment variables.

Heres an example of a script for MacOS: http://tinyurl.com/yo4xop

So in your OpenVPN configuration file, you'd call the scripts like this:
---
# Run resolv script on connection
up /etc/openvpn/scripts/set-vpn-dns.sh

# Return to default configuration after disconnection
down /etc/openvpn/scripts/reset-dns.sh
---


More information about the nylug-talk mailing list