openVPN gives error but then connects but i dont see local computers

Creating a bug report/issue

Required Information

  • DietPi version | 8.24
  • SBC model | `RPI4

Additional Information (if applicable)

  • Software title | OpenVPN
  • Was the software title installed freshly or updated/migrated? Y

Steps to reproduce

  1. try and connect to openVPN

Expected behaviour

  • … successful conection

Actual behaviour

  • … this error

Extra details

  • when i try and connect to my open VPN hosted at my house i get this error, after hitting OK 3 times it says i connect but then also can not see local computers at my house.

Can you double check that you selected the right config file? There are some syntax errors inside your .ovpn client file. Did you maybe upload the server config?

There is only one .ovpn file created after i did the setup on the server side.

Here is the config file, with the keys removed

client
proto udp
dev tun

# IP/domain name of DietPi system, running OpenVPN server
remote my home IP address 1194

resolv-retry infinite
nobind

user nobody
group nogroup

persist-key
persist-tun

remote-cert-tls server
comp-lzo
verb 3

<ca>
-----BEGIN CERTIFICATE-----
Cert
-----END CERTIFICATE-----
</ca>
<cert>
Certificate:
#Removed
-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----

-----END PRIVATE KEY-----
</key>

I think there is a misunderstanding. dietpi-vpn is a tool to connect to a VPN server, but in the config above it looks like DietPi is you server, and not a client.?
Can you please specify your usecase.

I have a dietpi system running Open VPN at my house, im trying to get another dietpi system running offsite to connect to my home network using dietpi-VPN.

Ok, so you need to generate a client config for the offsite DietPi system.
You could do it like the docs of OpenVPN suggest, but it’s maybe a bit overwhelming if you have no experience with it.
https://openvpn.net/community-resources/how-to/

Or you install PiVPN (also available via dietpi-software) which provides an interactive assistant to create new users and configs
https://dietpi.com/docs/software/vpn/#pivpn

1 Like

Very close now, but im getting this error.

image
and


and

Edit: i was able to create another opvn file for my phone and when it asks for the private key i enter the same password i try on the offsite client and it works. so i know i can connect.

Edit2: it looks like its trying to connect without the password and then gives me the option to type it in once it fails.

so its only working if i use openvpn --config client.ovpn

So when starting manually it does not prompt for username and password?
Maybe you can remove auth-user-pass-verify from the config, but to be honest, I have no practical experience with OpenVPN.
Maybe someone else has an idea?

WHen i use the command line yes it prompts for a password.

When i use dietpi-vpn and hit apply it looks like it dosnt give me time to enter the password until after it fails at connecting.

Link issue created at GitHub unable to connect to custom openvpn unable to enter private key password · Issue #6788 · MichaIng/DietPi · GitHub