Having problems with setting up openvpn

You can do it this way or you can use net manager to import the key.
I prefer doing this option as I don’t need to worry about running the script and can tweak it later with some other stuff.

If you’re interested just do the following…

right click network icon and hit edit connections…
click + sign
Scroll to the bottom on Import a saved VPN configuration…
create
browse to the key file…

This will open a new box with all the information.
Normally lands on the VPN tab.
Rename the very top box “Connection name” to whatever. IE ‘HTB VIP+ R0ckS!’
From here I personally goto Advanced bottom right…
I’ll rename the TUN from tun0 to like htb1 htb2 htb3 ect…
I tend to click the Specifiy exit or restart ping but don’t change anything.
(You can tweak other stuff but, stick with basic here to start)
Hit ok…

Next goto IPv4 Settings Tab
Click Routes
Click the checkbox for “Use this connection only for resources on its network”
Click ok…

Repeat on the IPv6 Tab
(I leave IPv6 on for HTB because some boxes can use this proto)

Now Save…
You’ll now be able to access this connection from Net Manager as if it was wifi.


Extra
For persistence I almost always do this on HTB connections or OSCP.

From terminal

nmcli connection modify <Your VPN connection name> vpn.persistent yes

You can use auto tab to help you complete your connection name.

There are a lot of options in this cli don’t screw around too much unless you know what you’re doing lol.

Sometimes Parrot acts a fool

Sometimes parrot won’t let you save the new setup. This is because it’s missing they User private Key on VPN… you can find it under /home/<user>/.cert/ as the -key.pem

All the files used for the VPN are here if you ever need that info.