This one has removed the inline feature
That's not windows bat files.. but bash scripts
So I looked really hard.
Edit: I'm apparently stupid, after deep dive I found out that the easyrsa3 can run bash scripts since it creates environment for it..
Anyway, there is missing some simply guide on how to actually use easy-tls, like how to create a new ovpn file with new inline certs.. how to set up a default ovpn file where these will be filled etc..
And every single time I actually try to test something I get an error "OpenVPN not found: openvpn"
Ofc I could use the command to define it, but how the hell do I define it so I dont have to do it manually ?
Edit2: Solved it by putting this in to vars...
set_var EASYTLS_OPENVPN "C:/Program Files/OpenVPN/bin/openvpn.exe"
Soooo, I am just tired today since I was up until 2 AM and I need some simplistic answer...
Until now I used build-key command from openvpn easyrsa folder to generate keys for new users and I put them all in to also generated ovpn file inline manually.
HOW can easy-tls do this automatically ? Please some simple guide.
I managed to create inline file from already created files by easyrsa with command inline-tls-auth, however, it contains absolutely no info about server therefore it's not ready ovpn file.. do I still have to manually copy the data there or how does it actually work ?
So far it would seem that I always have to:
1. Create new client using "easyrsa build-client-full xxxxxx nopass"
2. Create inline file using "easytls inline-tls-auth xxxxxx x"
3. Open my default .ovpn file and copy/paste inline data there.
Is that correct ?
Thank you.
Last edit: I helped myself, created 2 scripts, one for adding user, one for removal.. feel free to use, very simple and dumb scripts:
add (you have to create your own _default.ovpn file, where all settings you need will be present.. ofc except certificates setup which is done inline by easytls)
#!/bin/sh
# This script creates a new user for OpenVPN server.
if [ ! -z $1 ];
then
easyrsa build-client-full $1 nopass
easytls inline-tls-auth $1 1
cp pki/_default.ovpn pki/ovpn/$1.ovpn
cat pki/easytls/$1.inline >> pki/ovpn/$1.ovpn
else
echo "User undefined"
exit 0
fi
del
#!/bin/sh
# This script deletes user from OpenVPN server.
if [ ! -z $1 ];
then
easyrsa revoke $1
easyrsa gen-crl
easytls inline-remove $1
rm pki/ovpn/$1.ovpn
else
echo "User undefined"
exit 0
fi