OpenVPN as a service not working

Need help configuring your VPN? Just post here and you'll get that help.

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

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
Terrified Tuna
OpenVpn Newbie
Posts: 5
Joined: Tue May 11, 2021 11:01 am

OpenVPN as a service not working

Post by Terrified Tuna » Tue May 11, 2021 11:16 am

Hi Guys
I hope someone can help me get OpenVPN as a service to run.
I'm running OpenVPN 2.5.2 and the VPN is working fine, if I connect manually.
I can't get it to connect upon startup.

Things I have done:
1. Installed OpenVPN with admin credentials, and added the Service under 'Customize'.
2. Added the .ovpn-config with ekstra files to the 'config-auto'.

I have two services running:
OpenVPN Interactive Service
OpenVPNService

And one service set to manually:
OpenVPN Legacy Service

The services says running, but the VPN is not connecting.
I have tried to run the services with specific user, with admin rights, but that does not change anything.
Can anyone point me to a setup guide or maybe tell me what I'm doing wrong?

BR
Michael

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

Re: OpenVPN as a service not working

Post by TinCanTech » Tue May 11, 2021 11:25 am

See: C:\Program Files\Openvpn\config-auto

Terrified Tuna
OpenVpn Newbie
Posts: 5
Joined: Tue May 11, 2021 11:01 am

Re: OpenVPN as a service not working

Post by Terrified Tuna » Tue May 11, 2021 11:30 am

Hi TinCanTech and thank you for your reply.
I have already added the .ovpn-file and more to the 'config-auto' folder as per the readme.txt.
Am I missing something? :)

Terrified Tuna
OpenVpn Newbie
Posts: 5
Joined: Tue May 11, 2021 11:01 am

Re: OpenVPN as a service not working

Post by Terrified Tuna » Tue May 11, 2021 11:55 am

Server config file (pfSense Firewall)
server

Removed


Client config file
client.vpn

Removed


Client log with verb 4

Code: Select all

Removed
Last edited by Terrified Tuna on Tue May 11, 2021 2:58 pm, edited 19 times in total.

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

Re: OpenVPN as a service not working

Post by TinCanTech » Tue May 11, 2021 12:28 pm


Terrified Tuna
OpenVpn Newbie
Posts: 5
Joined: Tue May 11, 2021 11:01 am

Re: OpenVPN as a service not working

Post by Terrified Tuna » Tue May 11, 2021 1:12 pm

I wasn't 100 procent sure about what you meant, but I have updated the post with more info.
As mentioned. It works exactly as it should when connecting manually.

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

Re: OpenVPN as a service not working

Post by TinCanTech » Tue May 11, 2021 1:31 pm

Server log and client log at --verb 4

And if you read your logs then you will probably be able to diagnose the problem yourself ..

Terrified Tuna
OpenVpn Newbie
Posts: 5
Joined: Tue May 11, 2021 11:01 am

Re: OpenVPN as a service not working

Post by Terrified Tuna » Tue May 11, 2021 2:58 pm

I figured it out.
It was actually the keepalive that had me wondering.
Because the connection still was up when I rebooted, it couldn't connect again. When I lowered the keepalive it had time enough to close the existing connection before the computer had rebooted.

@TinCanTech Thank you for awesome support.... Really constructive and useful. I couldn't have done it without you and it's exactly that type of support I hoped for when I wrote here......

Post Reply