Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 249693

Summary: net-misc/openvpn - init script should execute /etc/openvpn/${VPN}.sh
Product: Gentoo Linux Reporter: Michael Wyraz <michael>
Component: New packagesAssignee: Cédric Krier <cedk>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: gentoo
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Michael Wyraz 2008-12-03 10:58:22 UTC
We changed some VPN servers from fedora/redhat to gentoo. On the old systems the start scripts executed /etc/openvpn/${VPN}.sh as root when openvpn was started. This was extremely usefull to setup VPN specific firewall rules and other things while dropping privileges for the openvpn itself. On gentoo this feature not exists.

It would be very helpfull (and easy to implement) if this would be integrated in the ini scripts.


Reproducible: Always

Steps to Reproduce:
Comment 1 Marcel Pennewiß 2009-07-30 09:00:45 UTC
You sould use /etc/openvpn/${VPN}-up.sh and /etc/openvpn/${VPN}-down.sh where ${VPN} is the name of symlink to the init-script (e.g. openvpn.testvpn). there you can set firewall rules and do other things. the tap/tun-device used for this service is the first parameter ($1) and can also be used in the scripts.
Comment 2 Cédric Krier gentoo-dev 2009-08-01 14:52:47 UTC
Feature already exists as explain in comment #1
Comment 3 Michael Wyraz 2009-08-11 14:26:27 UTC
/etc/openvpn/${VPN}-up.sh is only called when the VPN runs as client. There should be a similar thing when running as server. So the suggested solution does not apply to the scenario described here.
Comment 4 Cédric Krier gentoo-dev 2009-10-10 22:53:24 UTC
You can configure the up script in the configuration file for the server.