Hello, I have wanted to integrate my use of password store (https://www.passwordstore.org/) with openvpn for a while but never quite figured it out. After a conversation on #openvpn I discovered the Management Interface and was able to rather quickly write the script I wanted.
I will be fixing it up for ease of use but the basics here work: ``` sudo /usr/sbin/openvpn --management localhost 7505 \ --management-query-passwords \ --management-hold \ --config $1 >~/.openvpn.log & MGMT_IFACE=/dev/tcp/localhost/7505 until echo "" > $MGMT_IFACE do sleep 1 done exec 3> $MGMT_IFACE echo "hold release" >&3 echo "password Auth '$(pass $2 | head -n1)'" >&3 echo "username Auth $(pass $2 | head -n2 | tail -n1)" >&3 ``` $1 is my .ovpn file path $2 is the path used for pass to retrieve my username/password. for pass typically password is first line, username is second line in this case. Thanks, Craig Comstock | CFEngineer/digger at Northern.tech | personal: unreasonablefarm.org
signature.asc
Description: PGP signature
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel