Openvpn disconnected after signing out in Windows Server

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
marshall2020
OpenVpn Newbie
Posts: 4
Joined: Thu Jan 20, 2022 2:04 am

Openvpn disconnected after signing out in Windows Server

Post by marshall2020 » Mon Jan 24, 2022 3:01 am

Good day! I have some problem my Client Windows Server.
My OpenVPN is already connected in Client Windows Server then I sign out with the RDP user the OpenVPN is automatically disconneting.
Do you have any suggestion how to solve this problem?

[oconf=]
#Server Configuration
daemon openvpn-udp
mlock
cd /etc/openvpn
writepid /var/run/openvpn/server.pid
tls-cipher "DEFAULT:@SECLEVEL=0"
topology subnet
client-config-dir ./ccd-udp
ccd-exclusive


port 1194
proto udp
;dev tap
dev tun
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh.pem
;server-bridge 10.8.0.1 255.255.255.0 10.8.0.6 10.8.0.255
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist /var/log/openvpn/ipp.txt
client-connect ./MyConnect-UDP.py
client-disconnect ./MyDisconnect-UDP.py

;server-bridge

push "route 10.2.2.0 255.255.255.0"
push "route 10.0.1.0 255.255.255.0"
;push "route 10.0.2.0 255.255.255.0"
;push "route 10.0.3.0 255.255.255.0"
push "route 192.168.1.0 255.255.255.0"
;ifconfig-push 10.8.1.1 10.8.1.2

;route 10.0.1.0 255.255.255.0
;route 10.0.3.0 255.255.255.0
;route 10.0.2.0 255.255.255.0
route 10.0.1.0 255.255.255.0
route 192.168.1.0 255.255.255.0

;route 192.168.40.128 255.255.255.248
;client-config-dir ccd
;route 10.9.0.0 255.255.255.252

learn-address ./MyLearnaddress-UDP

;push "redirect-gateway def1 bypass-dhcp"

;push "dhcp-option DNS 208.67.222.222"
;push "dhcp-option DNS 208.67.220.220"

client-to-client

keepalive 10 120

tls-auth ta.key 0 # This file is secret

cipher AES-256-GCM
auth SHA256
;comp-lzo no

user openvpn
group openvpn

persist-key
persist-tun

status /var/log/openvpn/openvpn-status.log

log /var/log/openvpn/openvpn.log
log-append /var/log/openvpn/openvpn.log

verb 3

;mute 20

explicit-exit-notify 1
[/oconf]

[oconf=]
#Client Configuration
client
;dev tap
dev tun
proto udp
remote Server_IP 1194
resolv-retry infinite
nobind
;user nobody
;group nogroup
persist-key
persist-tun
ca ./certs/ca.crt
c;ert ./certs/client1.crt
key ./keys/client1.key
remote-cert-tls server
tls-auth ./keys/ta.key 1
cipher AES-256-GCM
auth SHA256
verb 3
key-direction 1
script-security 2
connect-retry 0
route-delay 5
route-method exe
ip-win32 netsh
[/oconf]

marshall2020
OpenVpn Newbie
Posts: 4
Joined: Thu Jan 20, 2022 2:04 am

temporary thread

Post by marshall2020 » Mon Jan 24, 2022 3:30 am

in README.txt i dont totally understand this...

"""This directory or its subdirectories should contain OpenVPN
configuration files each having an extension of .ovpn
that should be automatically started at boot up.

When OpenVPNService is started, a separate OpenVPN
process will be instantiated for each configuration file.

OpenVPN GUI does not scan this directory."""

Is this correct? ↓↓


C:\Program Files\OpenVPN\config-auto\client.ovpn

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

Re: Auto Disconnect user on logout

Post by TinCanTech » Mon Jan 24, 2022 6:01 am

marshall2020 wrote:
Mon Jan 24, 2022 3:30 am
in README.txt i dont totally understand this...
I do not comprehend that which you do not totally understand ?

Yes, it is correct.

May be you want the Openvpn-GUI for Windblows ?

marshall2020
OpenVpn Newbie
Posts: 4
Joined: Thu Jan 20, 2022 2:04 am

Re: Auto Disconnect user on logout

Post by marshall2020 » Mon Jan 24, 2022 7:09 am

TinCanTech wrote:
Mon Jan 24, 2022 6:01 am
marshall2020 wrote:
Mon Jan 24, 2022 3:30 am
in README.txt i dont totally understand this...
I do not comprehend that which you do not totally understand ?

Yes, it is correct.

May be you want the Openvpn-GUI for Windblows ?
Yes i have already OpenVPN GUI in Windows Server and it is already connected.
so i could tried to put the client.ovpn in C:\Program Files\OpenVPN\config-auto\client.ovpn then the next i don't know what should I do next?

Note: after putting the client.ovpn in C:\Program Files\OpenVPN\config-auto\ then connect the VPN in OPENVPN GUI then after signing out and it is not working the openvpn is automatically disconnected after signing in again.

-maybe there is something miss with what I did...

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

Re: Openvpn disconnected after signing out in Windows Server

Post by TinCanTech » Mon Jan 24, 2022 3:23 pm

I have absolutely no idea what you are trying to say.

Please start here: viewtopic.php?f=30&t=22603#p68963

I suggest you learn how to use the formatting tools here on the forum
and then post your log files.

Try to explain what you are trying to do.

Post Reply