Hi Ive seen a few threads reguarding OpenVPN on enigma2 so I thought I would show a tut of how I setup Digibit and Nord VPN with VPN Changer
In the first part I will show you how to rename all .ovpn files to .conf and add auth-user-pass/auth-user-pass password.conf you can skip this part if you have already done this. The second step will show you how to copy all conf files into subfolders with one command and add password.conf to each sub folder.
Feel free to edit password.conf to user,txt or whatever you prefer.
On the box create a folder called vpn in hdd
FTP your config files to hdd/vpn
1. using Talnet/putty type
This will put putty in hdd/vpn
2.Now to rename all .ovpn files to .conf
Type in talnet/putty
Code:
# rename .ovpn to .conf
for x in *.ovpn; do mv "$x" "${x%.ovpn}.conf"; done
3. To add auth-user-pass/auth-user-pass password.conf to each conf file in talnet/putty paste
Code:
# Edit all conf files to have auth-user-pass/auth-user-pass password.conf
find . -name "*.conf" -exec sed -i "s/auth-user-pass/auth-user-pass password.conf/g" '{}' \;
4. Now that is done we can move all configs into subfolders with the same name
Ensure Talnet is still in hdd/vpn before running this command
Copy and paste in talnet/putty
Code:
# Move all files into sub folders
for file in *; do
if [[ -f "$file" ]]; then
mkdir "${file%.*}"
mv "$file" "${file%.*}"
fi
done
5. Now to add password.conf to each sub folder we need to add password.conf to tmp with your username and password added.
Now use the following command to copy password.conf to each sub folder with this command
Code:
# copy password.conf to each sub folder
find /hdd/vpn -type d -exec cp /tmp/password.conf {} \;
Some VPN,s need cert files and other files simply edit the last command (.5) to suit
VPN Changer attached and is pretty simple to use, only issue is with OpenVix pressing red to stop/start OpenVPN just exits the plugin this is due to Key Mapping issue so you will need to goto OpenVPN in network to stop OpenaVPN.
If you dont want to use VPN Changer and prefer to drag configs just FTP the configs to vpn (create the vpn folder) and change command 1. to cd /vpn and jsut use commands 2. and 3. Add password.conf to etc/conf and you should just be able to drag any conf file from vpn to etc/openvpn