Archive

Posts Tagged ‘openvpn’

Fancy OpenVPN auto-setup script for Debian Lenny

May 22nd, 2009 No comments

I spent last night fighting with Debian madness, creating a script that will automatically set up OpenVPN access to our department network on Debian Lenny machines, including NetworkManager integration, gid-based default route selection (have two firefoxes running, one for normal browsing, another for VPN browsing) and sending mails from anywhere over the VPN.

Two things took me quite some time to debug. :( I had to divert nm-openvpn-service-openvpn-helper binary in order to be able to hook up there; apparently, scripts in /etc/NetworkManager/dispatcher.d and /etc/network/ifup.d/ aren’t called during VPN setups (probably a bug fixed in newer nm versions).

Another insight taught me at least a good lesson about debconf philosophy – I spent probably *hours* trying to feed debconf my new exim4-config setup (using $DEBCONF_DB_FALLBACK, $DEBCONF_DB_OVERRIDE, debconf-set-selections, …) but dpkg-reconfigure kept ignoring them and instead rewriting the debconf database according to the old defaults. Only then it dawned to me that the defaults are actually what it has read back from /etc/exim4 and that it’s supposed to ignore whatever is in the debconf database if a corresponding configuration is available in /etc already, actually. So were I not debconf-considerate and just plainly rewrote the /etc files at the start, everything would work magically. Well, I know that I can be brutal to my Debian now. ;-)

(On a semi-related note, I’m much happier openSUSE 11.1 notebook user now that I use nm-applet instead of knetworkmanager in my KDE3 environment.)

Categories: linux Tags: , , ,