Devin Howard's blog. You can follow me on Twitter: @devvmh
Whenever I use openvpn I'm stuck carting around 5 files, sending them over Bluetooth and cluttering up my phone's downloads directory or confusing people I'm setting up with openvpn
I decided finally to figure out inline openvpn client config files (note: all-in-one files don't work on the Securepoint SSL windows client). I made this sed script/command that will automate the process. Imagine that the following five correctly configured openvpn files are in my current directory, with the openvpn file referencing the others:
Run export VAR=devin and then run this code:
sed -i "${VAR}.ovpn" -e ' /ca ca.crt/ { a\<ca> r ca.crt a\</ca> d }' -e " /cert ${VAR}.crt/ { a\<cert> r ${VAR}.crt a\</cert> d }" -e " /key ${VAR}.key/ { a\<key> r ${VAR}.key a\</key> d }" -e ' /tls-auth ta.key 1/ { a\key-direction 1 a\<tls-auth> r ta.key a\</tls-auth> d }'
And blam, your file will be all in one.
Here's a rundown on the flags and commands I used in this code:
Comments
Vladimir Ovcharenko
Mon, 10/31/2016 - 18:06
Permalink
Today i got similar problem.
Add new comment