How to get manually functioning client.opvn to work with config-auto / OpenVPNService?

Scripts to manage certificates or generate config files

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
LuckyBenni
OpenVpn Newbie
Posts: 1
Joined: Mon May 16, 2022 1:45 pm

How to get manually functioning client.opvn to work with config-auto / OpenVPNService?

Post by LuckyBenni » Mon May 16, 2022 2:01 pm

Hi to all,
I am trying to configure a Windows server to auto reconnect after Windows reboot to an OpenVPN server based on the OpenVPNService.
While the config works successfully via the manual OpenVPN-GUI way (client asks for first time for username & password, stores it, reuses it later), I seem to struggle to provide the proper username / password information to the OpenVPNService to successfully start the connection with the same ovpn file. Following my client configuration (sensitive data sanitized):

dev tun
client
cipher AES-256-CBC
auth SHA512
auth-nocache
nobind
verb 6
max-routes 38
route-delay 2
remote-cert-tls server
tls-version-min 1.2
auth-user-pass pass.loggin

<connection>
remote x.x.x.x 1194 udp
</connection>

<connection>
remote FQDN 1194 udp
</connection>

<connection>
remote x.x.x.x 5443 tcp
</connection>

<connection>
remote FQDN 5443 tcp
</connection>

<pkcs12>
[certificate text]
</pkcs12>

The pass.loggin includes username and password for the OpenVPN user.

Is it possible that auto relogin via PKCS12 containing opvn files is not supported yet? What exactly do I potentially do wrong?

Any hint to get this to work is highly appreciated.

Thanks a ton for your support.
Benjamin

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: How to get manually functioning client.opvn to work with config-auto / OpenVPNService?

Post by TinCanTech » Mon May 16, 2022 2:55 pm

LuckyBenni wrote:
Mon May 16, 2022 2:01 pm
auth-nocache
Will forget the user/pass at reconnect, you probably do not want this.

Otherwise, log file at --verb 4.

Post Reply