Skip to contentSkip to conversation

First post and an alternative idea for OpenVPN startup on Linux

Openvpn-devel Paul Iadonisi 5 participants 10 messages Nov 17, 2004 – Nov 19, 2004

lore
Share & tools
lore
#0 lore raw

Hello,
I found out about OpenVPN some time ago, but only started playing with
it recently (in the past month or so). I've set up PPTP VPNs between Windows and Linux (not so comfortable with the security of it, though) as well as IPsec using Freeswan aka Openswan (unnecessarily complex, IMO). I haven't done anything with the built-in IPsec under Linux 2.6 yet, as my initial (short) experience with it was less than favorable.
So now that I've played around with OpenVPN for a while, I'm
thoroughly impressed! Especially at it's simplicity and the included scripts in easy-rsa (as openssl usually requires black magic to figure out what you need out of it), and most importantly the ease with which you can build VPNs right through firewalls (even those you don't control on the client end).
While working with various setups, I felt there might be a better way
to start up the VPN(s) with a little more granularity. In fact, at least in the case of Fedora Core (2 and 3 in my case), I thought it might be a good idea to integrate it into the /etc/sysconfig/network- scripts infrastructure so that I could just type 'ifup vpntowork' or 'ifup vpntoworksite2' to bring up individual vpn interfaces.
A few days later, I now have a pretty good set of scripts that do just
that. And to top it off, I have a workaround now for a problem that has been discussed on this list regarding chroot and/or uid/gid settings:
running a --down script that needs root access. In my setup, I have two wrapper scripts, upwrap-openvpn and downwrap-openvpn, which invoke the user's specified --up and --down scripts respectively. However, downwrap is not passed to openvpn; it is instead run by the ifdown- openvpn script. Details are in comments in the scripts themselves.
One thing I haven't commented on in the scripts is that both TYPE and
DEVICETYPE need to be set (TYPE=OpenVPN and DEVICETYPE=openvpn) in your ifcfg-<interface-or-nickname> script. Normally, you don't set DEVICETYPE in ifcfg-<interface> scripts -- it is used internally by 'ifup'. The proper way to do this is to actually patch a case statement in ifup, but I figured I'd take care of that after I determined how much interest there was in this.
A few more notes:

o This is very Fedora Core / Red Hat specific.
o I've changed the location of various directories and files to be more in line with the 'ifup' way of doing things. Keys and scripts go in /etc/sysconfig/openvpn, pid files are of the form /var/run/openvpn-<interface>.pid, status file is always /var/log/openvpn/<interface>.log, etc.
o Some of ifup-openvpn utilizes some rather obscure features of bash. I doubt it will work with ksh or the posix shell. I don't think that matters much because this is really intended to fit into the GNU/Linux (or at least, Fedora Core and Red Hat) way of doing things.
o I've not handled all OpenVPN options optimally, but plan to put a little more work into that. The trickiest part is options that take zero or more arguments.
o Last updated for OpenVPN 2.0_beta17 (i.e.: includes the --plugin option).

So that's the overview. I was going to attach the scripts to this
message, but I want to put copyright notices in the scripts first. Note that they will be GPLed, and I give James Yohan full permission to include the scripts in any potential commercial version (that was discussed not long ago on this list), though I'll retain the copyrights on this feeble amount of code (in comparison to James' contribution ;-)).
What I'll post shortly will be six scripts (ifup-openvpn, ifdown-
openvpn, upwrap-openvpn, downwrap-openvpn, and sample ifcfg-* scripts for a client and a bridged server) as well as the modified spec file I use to build my rpms. All comments and criticisms welcomed.
Oh, and thanks for an awesome piece of software!

Signature · 5 lines
-Paul Iadonisi
 Senior System Administrator
 Red Hat Certified Engineer / Local Linux Lobbyist
 Ever see a penguin fly?  --  Try Linux.
 GPL all the way: Sell services, don't lease secrets
#1 lore raw

And here they are

Signature · 5 lines
-Paul Iadonisi
 Senior System Administrator
 Red Hat Certified Engineer / Local Linux Lobbyist
 Ever see a penguin fly?  --  Try Linux.
 GPL all the way: Sell services, don't lease secrets

DEVICE=tap0
ONBOOT=no
USERCTL=yes
TYPE=OpenVPN
DEVICETYPE=openvpn
#
MODE=client
UP=client.up
DOWN=client.down
PROTO=udp
REMOTE="my-server-host 5000"
RESOLV_RETRY=infinite
NOBIND=yes
CA=sample-ca.crt
CERT=sample-cert.crt
KEY=sample-key.key
TLS_AUTH="ta.key 1"
COMP_LZO=yes
VERB=4

DEVICE=tap0
BOOTPROTO=static
IPADDR=0.0.0.0
ONBOOT=yes
BRIDGE=brg0
TYPE=OpenVPN
DEVICETYPE=openvpn
#
LOCAL=172.16.20.2
PORT=5000
PROTO=udp
CA=sample-ca.crt
CERT=sample-cert.crt
KEY=sample-key.key
DH=dh1024.pem
CRL_VERIFY=crl.pem
MODE="server-bridge 10.8.0.1 255.255.255.0 10.8.0.112 10.8.0.127" PUSH[0]="dhcp-option DNS 10.8.0.2"
PUSH[1]="dhcp-option DNS 10.8.0.4"
PUSH[2]="dhcp-option DOMAIN my.local.domain.com" #CLIENT_TO_CLIENT=yes
KEEPALIVE="10 60"
TLS_AUTH="ta.key 0"
REPLAY_PERSIST=yes
COMP_LZO=yes
MAX_CLIENTS=16
VERB=4

Summary: A Secure TCP/UDP Tunneling Daemon

Name:           openvpn
Version:        2.0_beta17

Release: 15
URL: http://sourceforge.net/projects/openvpn/
Source0: http://prdownloads.sourceforge.net/openvpn/%{name}-%{version}.tar.gz
Source1: ifup-openvpn
Source2: ifdown-openvpn
Source3: upwrap-openvpn
Source4: downwrap-openvpn
Source5: ifcfg-tap0.client
Source6: ifcfg-tap0.server-bridge
License: GPL
Group: Networking/Tunnels
BuildRoot: %{_tmppath}/%{name}-%(id -un)

%{!?_without_lzo:BuildRequires: lzo-devel}
%{!?_without_lzo:Requires: lzo}

%description
OpenVPN is a robust and highly flexible tunneling application that uses all of the encryption, authentication, and certification features of the OpenSSL library to securely tunnel IP networks over a single UDP port. It can use the Marcus Franz Xaver Johannes Oberhumer's LZO library for compression.

%define debug_package %{nil}

%prep
%setup -q

%build
%configure %{?_without_lzo:--disable-lzo}
%__make

%__cp -p ${RPM_SOURCE_DIR}/ifup-openvpn sample-scripts/ %__cp -p ${RPM_SOURCE_DIR}/ifdown-openvpn sample-scripts/ %__cp -p ${RPM_SOURCE_DIR}/upwrap-openvpn sample-scripts/ %__cp -p ${RPM_SOURCE_DIR}/downwrap-openvpn sample-scripts/ %__mkdir sample-ifcfg-files
%__cp -p ${RPM_SOURCE_DIR}/ifcfg-* sample-ifcfg-files/

%install
[ %{buildroot} != "/" ] && rm -rf %{buildroot}

%__install -c -d -m 755 %{buildroot}%{_mandir}/man8
%__install -c -m 755 %{name}.8 %{buildroot}%{_mandir}/man8
%__install -c -d -m 755 %{buildroot}%{_sbindir}
%__install -c -m 755 %{name} %{buildroot}%{_sbindir}
#%__install -c -d -m 755 %{buildroot}/etc/rc.d/init.d
#%__install -c -m 755 sample-scripts/%{name}.init %{buildroot}/etc/rc.d/init.d/%{name} %__install -c -d -m 755 %{buildroot}/etc/sysconfig/network-scripts %__install -c -m 755 sample-scripts/ifup-openvpn \
%{buildroot}/etc/sysconfig/network-scripts
%__install -c -m 755 sample-scripts/ifdown-openvpn \
%{buildroot}/etc/sysconfig/network-scripts
%__install -c -m 755 sample-scripts/upwrap-openvpn \
%{buildroot}/etc/sysconfig/network-scripts
%__install -c -m 755 sample-scripts/downwrap-openvpn \
%{buildroot}/etc/sysconfig/network-scripts
%__install -c -d -m 700 %{buildroot}/var/run/openvpn
%__install -c -d -m 700 %{buildroot}/var/lib/openvpn
%__install -c -d -m 700 %{buildroot}/var/log/openvpn
%__install -c -d -m 700 %{buildroot}/etc/sysconfig/openvpn

#%__install -c -d -m 755 %{buildroot}/etc/%{name}

%__mkdir_p %{buildroot}%{_datadir}/%{name}
%__cp -pr contrib easy-rsa sample-{config-file,key,script,ifcfg-file}s %{buildroot}%{_datadir}/%{name}

%clean
[ %{buildroot} != "/" ] && rm -rf %{buildroot}

%pre

/usr/sbin/useradd -c "OpenVPN" -u 150 \
	-s /sbin/nologin -r -d /var/lib/openvpn openvpn 2>/dev/null || :

%post
case "uname -r" in
2.4*)

	/bin/mkdir /dev/net >/dev/null 2>&1 || :
	/bin/mknod /dev/net/tun c 10 200 >/dev/null 2>&1 || :
	;;

esac
#/sbin/chkconfig --add %{name}
#/sbin/service %{name} condrestart

%preun
#if [ "$1" = 0 ]
#then
# /sbin/service %{name} stop
# /sbin/chkconfig --del %{name}
#fi

%files
%defattr(-,root,root)
%doc AUTHORS COPYING COPYRIGHT.GPL INSTALL NEWS PORTS README %{_mandir}/man8/%{name}.8*
%{_sbindir}/%{name}
%{_datadir}/%{name}
#/etc/rc.d/init.d/*
#/etc/openvpn /etc/sysconfig/network-scripts/ifup-openvpn /etc/sysconfig/network-scripts/ifdown-openvpn /etc/sysconfig/network-scripts/upwrap-openvpn /etc/sysconfig/network-scripts/downwrap-openvpn %dir %attr(0700,openvpn,openvpn) /var/run/openvpn %dir %attr(0700,openvpn,openvpn) /var/lib/openvpn %dir %attr(0700,openvpn,openvpn) /var/log/openvpn %dir %attr(0700,root,root) /etc/sysconfig/openvpn

%changelog
* Sun Nov 17 2004 Paul Iadonisi <[email protected]...> 2.0_beta15-15
- Added copyright notices to scripts in /etc/sysconfig/network-scripts

* Sun Nov 14 2004 Paul Iadonisi <[email protected]...> 2.0_beta15-11
- Include wrapper scripts in src rpm. feh

* Fri Nov 12 2004 Paul Iadonisi <[email protected]...> 2.0_beta15-9
- Run --down script from ifdown-openvpn instead from within openvpn
- so that it gets run as root, instead of the openvpn user.

* Fri Nov 05 2004 Paul Iadonisi <[email protected]...> 2.0_beta15-8
- version 2.0_beta15

* Fri Nov 05 2004 Paul Iadonisi <[email protected]...> 2.0_beta13-7
- Add utilize ifup/ifdown scripts instead of init script

* Fri Oct 22 2004 Paul Iadonisi <[email protected]...> 2.0_beta13-1
- version 2.0_beta13

* Fri Oct 22 2004 Paul Iadonisi <[email protected]...> 2.0_beta12-1
- version 2.0_beta12

* Sun Feb 23 2003 Matthias Andree <[email protected]...> 1.3.2.14-1.
- Have the version number filled in by autoconf.

* Wed Jul 10 2002 James Yonan <[email protected]...> 1.3.1-1
- Fixed %preun to only remove service on final uninstall

* Mon Jun 17 2002 bishop clark (LC957) <[email protected]...> 1.2.2-1
- Added condrestart to openvpn.spec & openvpn.init.

* Wed May 22 2002 James Yonan <[email protected]...> 1.2.0-1
- Added mknod for Linux 2.4.

* Wed May 15 2002 Doug Keller <[email protected]...> 1.1.1.16-2
- Added init scripts
- Added conf file support

* Mon May 13 2002 bishop clark (LC957) <[email protected]...> 1.1.1.14-1
- Added new directories for config examples and such

* Sun May 12 2002 bishop clark (LC957) <[email protected]...> 1.1.1.13-1
- Updated buildroot directive and cleanup command
- added easy-rsa utilities

* Mon Mar 25 2002 bishop clark (LC957) <[email protected]...> 1.0-1
- Initial build.

#2 lore raw
In reply to Paul Iadonisi
Quoted 35 lines · Paul Iadonisi

While working with various setups, I felt there might be a better way
to start up the VPN(s) with a little more granularity. In fact, at least in the case of Fedora Core (2 and 3 in my case), I thought it might be a good idea to integrate it into the /etc/sysconfig/network- scripts infrastructure so that I could just type 'ifup vpntowork' or 'ifup vpntoworksite2' to bring up individual vpn interfaces.
A few days later, I now have a pretty good set of scripts that do just
that. And to top it off, I have a workaround now for a problem that has been discussed on this list regarding chroot and/or uid/gid settings:
running a --down script that needs root access. In my setup, I have two wrapper scripts, upwrap-openvpn and downwrap-openvpn, which invoke the user's specified --up and --down scripts respectively. However, downwrap is not passed to openvpn; it is instead run by the ifdown- openvpn script. Details are in comments in the scripts themselves.
One thing I haven't commented on in the scripts is that both TYPE and
DEVICETYPE need to be set (TYPE=OpenVPN and DEVICETYPE=openvpn) in your ifcfg-<interface-or-nickname> script. Normally, you don't set DEVICETYPE in ifcfg-<interface> scripts -- it is used internally by 'ifup'. The proper way to do this is to actually patch a case statement in ifup, but I figured I'd take care of that after I determined how much interest there was in this.

...

DEVICE=tap0
ONBOOT=no
USERCTL=yes
TYPE=OpenVPN
DEVICETYPE=openvpn
#
MODE=client
UP=client.up
DOWN=client.down
PROTO=udp
REMOTE="my-server-host 5000"

Quoted 8 lines

RESOLV_RETRY=infinite
NOBIND=yes
CA=sample-ca.crt
CERT=sample-cert.crt
KEY=sample-key.key
TLS_AUTH="ta.key 1"
COMP_LZO=yes
VERB=4

I think it's a good idea to have simple "redhat look-alike" scripts to start / stop individual openvpn tunnels, to make life easier for users.

But, I hounestly dislike the idea of introducing a new config file format like this. I don't really see the purpose. Why not just refer to an OpenVPN config file instead?

Perhaps this makes it easier in the short run for users to get going, but when they run into problems and start digging in the OpenVPN documentation or asks questions here on the forum, I think it will just cause confusion having the configuration in an other place, and in a slightly diffrent format.

It will also make it harder to cut and paste sample configs, or move configs betweens diffrent platforms.

Just my $0.02.

/Mathias

#3 lore raw

On Thu, 2004-11-18 at 07:20 +0100, Mathias Sundman wrote:

[snip]

Quoted 6 lines

I think it's a good idea to have simple "redhat look-alike" scripts to start / stop individual openvpn tunnels, to make life easier for users.

But, I hounestly dislike the idea of introducing a new config file format like this. I don't really see the purpose. Why not just refer to an OpenVPN config file instead?

While I can understand that assessment, and even hesitated at
implementing this myself, I'll note that Red Hat does in fact do this both with the built-in IPsec and with dhcp configuration.
I've actually seen this kind of thing as a common tension between the
application developers' desire to make an application appear the same, or largely same, no matter what platform you are on, and the platform developers' desire to make things fit nicely into their own platform. I guess I fit into the later category.
Perhaps its something to be bundled with initscripts instead of
openvpn? It's probably the more appropriate place, anyhow, since I don't think any other packages include their own ifup-*/ifdown-* scripts.
Unfortunately, I may have a *harder* time convincing Red Hat to
include it, along with a patch to /etc/sysconfig/network-scripts/ifup because Red Hat doesn't include OpenVPN at all and may not see any justification for customized initscripts to support it. It is, however, in Fedora Extras (I think only 1.6, though, at the moment), so maybe there is a chance that it will one day be included.
*sigh* Oh, well, if James doesn't want to include this, I'll
understand. But might I suggest just dropping them in the contrib dir? And if you're really ambitious, you could introduce a --with option to optionally build an rpm with them in the spec file ;-) (or...I could do that, if there's interest). If not, then, oh well ... I guess I'll just maintain them for my own use.

Signature · 5 lines
-Paul Iadonisi
 Senior System Administrator
 Red Hat Certified Engineer / Local Linux Lobbyist
 Ever see a penguin fly?  --  Try Linux.
 GPL all the way: Sell services, don't lease secrets
#4 lore raw
Quoted 27 lines · Paul Iadonisi

On Thu, 2004-11-18 at 07:20 +0100, Mathias Sundman wrote:

[snip]

Quoted 6 lines

I think it's a good idea to have simple "redhat look-alike" scripts to start / stop individual openvpn tunnels, to make life easier for users.

But, I hounestly dislike the idea of introducing a new config file format like this. I don't really see the purpose. Why not just refer to an OpenVPN config file instead?

While I can understand that assessment, and even hesitated at
implementing this myself, I'll note that Red Hat does in fact do this both with the built-in IPsec and with dhcp configuration.
I've actually seen this kind of thing as a common tension between the
application developers' desire to make an application appear the same, or largely same, no matter what platform you are on, and the platform developers' desire to make things fit nicely into their own platform. I guess I fit into the later category.
Perhaps its something to be bundled with initscripts instead of
openvpn? It's probably the more appropriate place, anyhow, since I don't think any other packages include their own ifup-*/ifdown-* scripts.
Unfortunately, I may have a *harder* time convincing Red Hat to
include it, along with a patch to /etc/sysconfig/network-scripts/ifup because Red Hat doesn't include OpenVPN at all and may not see any justification for customized initscripts to support it. It is, however,

Quoted 8 lines

in Fedora Extras (I think only 1.6, though, at the moment), so maybe there is a chance that it will one day be included.
*sigh* Oh, well, if James doesn't want to include this, I'll
understand. But might I suggest just dropping them in the contrib dir? And if you're really ambitious, you could introduce a --with option to optionally build an rpm with them in the spec file ;-) (or...I could do that, if there's interest). If not, then, oh well ... I guess I'll just maintain them for my own use.

IMHO RH and other distros inhibit customization by adjusting apps to their own liking. This improves their ability to support their distros, but can make it difficult when you want to upgrade to a newer version that is not yet supported by them.

I distinctly remember upgrading RH8 to from httpd 1.??? to the latest 2.??? Let's just say it wasn't fun.

Signature · 2 lines
Leonard Isham, CISSP
Ostendo non ostento.
#5 lore raw
In reply to Paul Iadonisi
Quoted 11 lines · Paul Iadonisi

On Thu, 2004-11-18 at 07:20 +0100, Mathias Sundman wrote:

[snip]

Quoted 6 lines

I think it's a good idea to have simple "redhat look-alike" scripts to start / stop individual openvpn tunnels, to make life easier for users.

But, I hounestly dislike the idea of introducing a new config file format like this. I don't really see the purpose. Why not just refer to an OpenVPN config file instead?

Quoted 8 lines

While I can understand that assessment, and even hesitated at
implementing this myself, I'll note that Red Hat does in fact do this both with the built-in IPsec and with dhcp configuration.
I've actually seen this kind of thing as a common tension between the
application developers' desire to make an application appear the same, or largely same, no matter what platform you are on, and the platform developers' desire to make things fit nicely into their own platform. I guess I fit into the later category.

The main problem I have with this approach is that it creates a new configuration interface for OpenVPN which must be documented and maintained. It also creates problems for people who want to migrate to and from the distribution where the alternative interface is supported.

Now having said that, I do appreciate that distribution developers want to provide a consistent interface to daemon configuration. But I've also observed that most distributions have a line they will not cross as far as redefining the details of a particular daemon's configuration format. SuSE, for example (like most Linux distros) has a bunch of SuSE-specific front-ends for network daemons in /etc/sysconfig, but at the same time they would not touch a more configuration-complex daemon such as samba which has its own tree in /etc/samba and aside from the SuSE-modified smb.conf, exists largely unaltered from the samba.org release. I would put OpenVPN in the same camp -- the configuration is too complex to be able to be rewritten into /etc/sysconfig as you would an ethernet adapter or DHCP client config.

I think the bottom line is that the portability and stability of the configuration spec matters. In my view one of the largest hurdles that open source projects need to overcome in order to become viable is achieving a critical mass of documentation. Now that the OpenVPN project has largely attained this, I'm going to be extremely hesistant in embracing any kind of config file spec refactoring that would render this documentation obsolete.

James

#6 lore raw
Quoted 22 lines · James Yonan
Quoted 19 lines · Paul Iadonisi

On Thu, 2004-11-18 at 07:20 +0100, Mathias Sundman wrote:

[snip]

Quoted 6 lines

I think it's a good idea to have simple "redhat look-alike" scripts to start / stop individual openvpn tunnels, to make life easier for users.

But, I hounestly dislike the idea of introducing a new config file format like this. I don't really see the purpose. Why not just refer to an OpenVPN config file instead?

While I can understand that assessment, and even hesitated at
implementing this myself, I'll note that Red Hat does in fact do this both with the built-in IPsec and with dhcp configuration.
I've actually seen this kind of thing as a common tension between the
application developers' desire to make an application appear the same, or largely same, no matter what platform you are on, and the platform developers' desire to make things fit nicely into their own platform. I guess I fit into the later category.

...

Quoted 11 lines

I think the bottom line is that the portability and stability of the configuration spec matters. In my view one of the largest hurdles that open source projects need to overcome in order to become viable is achieving a critical mass of documentation. Now that the OpenVPN project has largely attained this, I'm going to be extremely hesistant in embracing any kind of config file spec refactoring that would render this documentation obsolete.

James

Just an idea, would it be acceptable to you bouth if it is done like
this:
---
TYPE=OpenVPN
DEVICETYPE=tap1 # or tun1
OpenVPNCFG=/etc/openvpn/client.conf # or /etc/openvpn/server.openvpn USERCTL=no # yes? - use RH/FC's idea to start it
ONBOOT=yes # no
USEDIF=eth0 # what other interface is needed up to work, maybe...?
---
This way the 'real' configuration, except giving users the right to
start/stop the vpn tunnel, is kept in openvpn's config file, but leaves a root for managing with distro's specific configuration tool(s) or by hand. Fedora's system-config-network can be extended with OpenVPN specific GUI for OpenVPN config file editing too...
Is this OK? I hope this scenario will work for most other distros too?

Just my 0.02 lv :)

Signature · 4 lines
Regards,
  Doncho N. Gunchev    Registered Linux User #291323 at counter.li.org
  GPG-Key-ID: 1024D/DA454F79                        http://pgp.mit.edu
  Key fingerprint = 684F 688B C508 C609 0371  5E0F A089 CB15 DA45 4F79
#7 lore raw
Quoted 18 lines · Doncho N. Gunchev

Just an idea, would it be acceptable to you bouth if it is done like
this:
---
TYPE=OpenVPN
DEVICETYPE=tap1 # or tun1
OpenVPNCFG=/etc/openvpn/client.conf # or /etc/openvpn/server.openvpn USERCTL=no # yes? - use RH/FC's idea to start it
ONBOOT=yes # no
USEDIF=eth0 # what other interface is needed up to work, maybe...?
---
This way the 'real' configuration, except giving users the right to
start/stop the vpn tunnel, is kept in openvpn's config file, but leaves a root for managing with distro's specific configuration tool(s) or by hand. Fedora's system-config-network can be extended with OpenVPN specific GUI for OpenVPN config file editing too...
Is this OK? I hope this scenario will work for most other distros too?

Quoted 1 line

Just my 0.02 lv :)

After some thought, I actually like this idea, as it preserves what
appears to be the general consensus that the config file should be portable across platforms, yet allows for the use of ifup to start specific VPNs instead of 'service openvpn start' which starts all tunnels. One thing I'd probably still check for, though, is the 'dev' option ... I would probably disallow it in the openvpn *.conf file and just spit out a statement to that fact. Only because it conflicts with the usual way of specifying the DEVICE in the ifcfg-* file.
Stay tuned ... I may have an updated version in the near future that
does just this. Actually, it's too easy *not* to implement it. :-) I may, however, hang onto my original versions just for posterity's sake ... bash is just so cool.

Signature · 5 lines
-Paul Iadonisi
 Senior System Administrator
 Red Hat Certified Engineer / Local Linux Lobbyist
 Ever see a penguin fly?  --  Try Linux.
 GPL all the way: Sell services, don't lease secrets
#8 lore raw
In reply to James Yonan
Quoted 4 lines · James Yonan

The main problem I have with this approach is that it creates a new configuration interface for OpenVPN which must be documented and maintained. It also creates problems for people who want to migrate to and from the distribution where the alternative interface is supported.

True, but I wasn't planning on just throwing this over the wall and
abandoning it. I do plan on documenting this and the making clear that it is not the stock OpenVPN way of doing things, but Fedora specific.

Quoted 4 lines

Now having said that, I do appreciate that distribution developers want to provide a consistent interface to daemon configuration. But I've also observed that most distributions have a line they will not cross as far as redefining the details of a particular daemon's configuration format.

Sometimes true, sometimes not. Take a gander under the covers at the
(native) configuration for the IPsec (not Openswan) racoon files and how it's integrated into Fedora Core 2 and 3 for an example of a native config file that, IMO, is much more complex than OpenVPN's. Red Hat's approach actually simplifies it in my mind. OpenVPN is a bit different in that the *format* of the config file is actually quite simple and easy to convert to the ifcfg-* format (well, with the exception of the 'zero or more args' problem that I haven't figured out yet). So I don't think it's really at matter of how complex a daemon is, but rather what it does. OpenVPN is no different than IPsec with respect to it's intended purpose (though it does the job much better, IMO :-))
My approach does (as well as Red Hat's and some others), however,
complicate matters for me if I want to migrate to another distribution. It does create a sort of lock-in, though clearly not as bad as a proprietary lock-in (since I can pick apart what Red Hat's done and figure out the 'native' way of doing things for each app). Personally, I don't mind that. I prefer the consistency within the distribution that it creates for me. I don't mind when each OS works differently. I actually prefer it when the apps plug-in to the existing architecture of each OS.

Quoted 7 lines

I think the bottom line is that the portability and stability of the configuration spec matters. In my view one of the largest hurdles that open source projects need to overcome in order to become viable is achieving a critical mass of documentation. Now that the OpenVPN project has largely attained this, I'm going to be extremely hesistant in embracing any kind of config file spec refactoring that would render this documentation obsolete.

But I wouldn't think that the bulk of the documentation is dependent
the actual format of the config file, but rather the description of what each option does. That said, I wouldn't expect that this documentation be changed, anyhow. Just as I (or Red Hat) wouldn't expect the documentation for Linux 2.6 IPsec to be modified to accommodate the way Red Hat has integrated it into its release.
And that's why in my response to Mathias Sundman, I pretty much
conceded that the OpenVPN tarball is not the place for these scripts, unless you want to drop them in the contrib dir. They are probably more suited for the initscripts package, since that's where all the others are.
But I'm not going to tackle trying to get these scripts into
initscripts just yet. I posted them here to get feedback, which I've gotten. I'll spend time on improving the implementation a bit and then maybe bring it up on fedora-devel-list. If you have objections to even that approach, let me know and I'll reconsider.
I *really* appreciate the contribution you've made with OpenVPN and
wouldn't want to create support headaches for you. I would hope that people who use software built into a distribution rely on the distribution vendor for their first line of support (albeit, only through the mailing list for Fedora Core since 'this is not a supported product of Red Hat' ;-)). I have a looming thought that if I proceed with and succeed at getting this stuff integrated into initscripts, that *I'm* going to be that first line of support. Ugh. What am I getting myself into?!

Signature · 5 lines
-Paul Iadonisi
 Senior System Administrator
 Red Hat Certified Engineer / Local Linux Lobbyist
 Ever see a penguin fly?  --  Try Linux.
 GPL all the way: Sell services, don't lease secrets
#9 lore raw

And please forgive me for misspelling your name. Doh!

Signature · 5 lines
-Paul Iadonisi
 Senior System Administrator
 Red Hat Certified Engineer / Local Linux Lobbyist
 Ever see a penguin fly?  --  Try Linux.
 GPL all the way: Sell services, don't lease secrets