[Resolved] Can't connect to OPenVPN running on Windows VPS

This forum is for admins who are looking to build or expand their OpenVPN setup.

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.
Locked
IhaveNoIdea
OpenVpn Newbie
Posts: 8
Joined: Thu Jun 03, 2021 4:33 pm

[Resolved] Can't connect to OPenVPN running on Windows VPS

Post by IhaveNoIdea » Thu Jun 03, 2021 5:08 pm

Hello there,

I'm trying to setup VPN on friend's Windows VPS, i never though it will be such a nightmare compare to Linux.
I'll followed this guide https://wiki.teltonika-networks.com/vie ... on_Windows , however i think there is missing point.

VPS itself can connect to the server.ovpn without any problems( I guess it's required to be connected like that to be online, as i never did this before)

Problem is i can't join from the client side no matter what... I'm frustrated from this and was not able to find answer anywhere.

Server.ovpn configuration:

Code: Select all

port 1194
proto udp
dev tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\server_customname.crt"
key "C:\\Program Files\\OpenVPN\\config\\server_customname.key"
dh "C:\\Program Files\\OpenVPN\\config\\dh2048.pem"
server 10.8.0.0 255.255.255.0
keepalive 10 120
cipher AES-256-CBC
ncp-ciphers AES-128-GCM
push "block-outside-dns"
push "dhcp-option DNS 9.9.9.9"
push "dhcp-option DNS 149.112.112.112"
push "redirect-gateway def1 bypass-dhcp"
tls-server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
persist-key
persist-tun
verb 3
explicit-exit-notify 1
client-config-dir "C:\\Program Files\\OpenVPN\\config\\ccd"
ifconfig-pool-persist "C:\\Program Files\\OpenVPN\\log\\ipp.tx"
My ovpn client file looks like:

Code: Select all

client
proto udp
explicit-exit-notify
remote MYIP 1194
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
verify-x509-name server_customname name
auth SHA256
auth-nocache
cipher AES-128-GCM
tls-client
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
ignore-unknown-option block-outside-dns
setenv opt block-outside-dns # Prevent Windows 10 DNS leak
verb 3
-----BEGIN CERTIFICATE-----
ALL KEYS BELOW
Im using OpenVPN client to access my VPN (My linux one works pretty well), however when i try to join the windows one, it just wouldn't connect.
Here is a log report https://pastebin.com/GgZyPaHw

Help will be much appreciated as I'm really frustrated from this setup of OpenVPN on windows :oops: :(

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

Re: Can't connect to OPenVPN running on Windows VPS

Post by TinCanTech » Thu Jun 03, 2021 8:46 pm

See your server log

IhaveNoIdea
OpenVpn Newbie
Posts: 8
Joined: Thu Jun 03, 2021 4:33 pm

Re: Can't connect to OPenVPN running on Windows VPS

Post by IhaveNoIdea » Thu Jun 03, 2021 8:57 pm

TinCanTech wrote:
Thu Jun 03, 2021 8:46 pm
See your server log
Hello there,

server.log

Code: Select all

2021-06-03 22:42:07 Note: Treating option '--ncp-ciphers' as  '--data-ciphers' (renamed in OpenVPN 2.5).
2021-06-03 22:42:07 WARNING: --topology net30 support for server configs with IPv4 pools will be removed in a future release. Please migrate to --topology subnet as soon as possible.
2021-06-03 22:42:07 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-128-GCM). Future OpenVPN version will ignore --cipher for cipher negotiations. Add 'AES-256-CBC' to --data-ciphers or change --cipher 'AES-256-CBC' to --data-ciphers-fallback 'AES-256-CBC' to silence this warning.
2021-06-03 22:42:07 --pull-filter ignored for --mode server
2021-06-03 22:42:07 OpenVPN 2.5.2 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Apr 21 2021
2021-06-03 22:42:07 Windows version 10.0 (Windows 10 or greater) 64bit
2021-06-03 22:42:07 library versions: OpenSSL 1.1.1k  25 Mar 2021, LZO 2.10
Enter Management Password:
2021-06-03 22:42:07 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
2021-06-03 22:42:07 Need hold release from management interface, waiting...
2021-06-03 22:42:08 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
2021-06-03 22:42:08 MANAGEMENT: CMD 'state on'
2021-06-03 22:42:08 MANAGEMENT: CMD 'log all on'
2021-06-03 22:42:08 MANAGEMENT: CMD 'echo all on'
2021-06-03 22:42:08 MANAGEMENT: CMD 'bytecount 5'
2021-06-03 22:42:08 MANAGEMENT: CMD 'hold off'
2021-06-03 22:42:08 MANAGEMENT: CMD 'hold release'
2021-06-03 22:42:08 Diffie-Hellman initialized with 2048 bit key
2021-06-03 22:42:08 CRL: loaded 1 CRLs from file crl.pem
2021-06-03 22:42:08 interactive service msg_channel=516
2021-06-03 22:42:08 ROUTE_GATEWAY 194.163.128.1/255.255.192.0 I=5 HWADDR=00:50:56:42:71:b8
2021-06-03 22:42:08 open_tun
2021-06-03 22:42:08 tap-windows6 device [OpenVPN TAP-Windows6] opened
2021-06-03 22:42:08 TAP-Windows Driver Version 9.24 
2021-06-03 22:42:08 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.1/255.255.255.252 on interface {6B9D1108-F494-4160-9C3A-CB31135E7B17} [DHCP-serv: 10.8.0.2, lease-time: 31536000]
2021-06-03 22:42:08 Sleeping for 10 seconds...
2021-06-03 22:42:18 Successful ARP Flush on interface [9] {6B9D1108-F494-4160-9C3A-CB31135E7B17}
2021-06-03 22:42:18 MANAGEMENT: >STATE:1622752938,ASSIGN_IP,,10.8.0.1,,,,
2021-06-03 22:42:18 IPv4 MTU set to 1500 on interface 9 using service
2021-06-03 22:42:18 MANAGEMENT: >STATE:1622752938,ADD_ROUTES,,,,,,
2021-06-03 22:42:18 C:\Windows\system32\route.exe ADD 10.8.0.0 MASK 255.255.255.0 10.8.0.2
2021-06-03 22:42:18 ROUTE: route addition failed using service: The object already exists.   [status=5010 if_index=9]
2021-06-03 22:42:18 Route addition via service failed
2021-06-03 22:42:18 Could not determine IPv4/IPv6 protocol. Using AF_INET6
2021-06-03 22:42:18 Socket Buffers: R=[65536->65536] S=[65536->65536]
2021-06-03 22:42:18 setsockopt(IPV6_V6ONLY=0)
2021-06-03 22:42:18 UDPv6 link local (bound): [AF_INET6][undef]:1194
2021-06-03 22:42:18 UDPv6 link remote: [AF_UNSPEC]
2021-06-03 22:42:18 MULTI: multi_init called, r=256 v=256
2021-06-03 22:42:18 IFCONFIG POOL IPv4: base=10.8.0.4 size=62
2021-06-03 22:42:18 IFCONFIG POOL LIST
2021-06-03 22:42:18 Initialization Sequence Completed
2021-06-03 22:42:18 MANAGEMENT: >STATE:1622752938,CONNECTED,SUCCESS,10.8.0.1,,,,

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

Re: Can't connect to OPenVPN running on Windows VPS

Post by TinCanTech » Thu Jun 03, 2021 9:27 pm

That means your client cannot find your server .. and a couple of other silly errors as well.

IhaveNoIdea
OpenVpn Newbie
Posts: 8
Joined: Thu Jun 03, 2021 4:33 pm

Re: Can't connect to OPenVPN running on Windows VPS

Post by IhaveNoIdea » Thu Jun 03, 2021 9:37 pm

TinCanTech wrote:
Thu Jun 03, 2021 9:27 pm
That means your client cannot find your server .. and a couple of other silly errors as well.
Ah damn it... Is there anything i can do?

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

Re: Can't connect to OPenVPN running on Windows VPS

Post by TinCanTech » Thu Jun 03, 2021 10:13 pm

IhaveNoIdea wrote:
Thu Jun 03, 2021 5:08 pm
Im using OpenVPN client to access my VPN (My linux one works pretty well), however when i try to join the windows one, it just wouldn't connect.
IhaveNoIdea wrote:
Thu Jun 03, 2021 9:37 pm
Is there anything i can do?
I ditched Windows ..

Is there anything else you can do .. probably ..

Even extracting the few understandable comments from your initial post is not enough to answer your question.

If your client cannot connect to your server then check the usual things .. it's not rocket science.

IhaveNoIdea
OpenVpn Newbie
Posts: 8
Joined: Thu Jun 03, 2021 4:33 pm

Re: Can't connect to OPenVPN running on Windows VPS

Post by IhaveNoIdea » Thu Jun 03, 2021 11:09 pm

TinCanTech wrote:
Thu Jun 03, 2021 10:13 pm
IhaveNoIdea wrote:
Thu Jun 03, 2021 5:08 pm
Im using OpenVPN client to access my VPN (My linux one works pretty well), however when i try to join the windows one, it just wouldn't connect.
IhaveNoIdea wrote:
Thu Jun 03, 2021 9:37 pm
Is there anything i can do?
I ditched Windows ..

Is there anything else you can do .. probably ..

Even extracting the few understandable comments from your initial post is not enough to answer your question.

If your client cannot connect to your server then check the usual things .. it's not rocket science.
Not sure what you mean by usual things.. But i think i'm done...

Reinstall didn't fixed it and now i'm out of ideas how to fix this. I tried it on Linux with same VPS provider and there is no problem with connecting to that. Wonder if there is anyone, who managed to run OpenVPN server on windows VPS. I wanted to help a friend, but unfortunately i'm unable to do it. At least thank you for your responses.

Regards.

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

Re: Can't connect to OPenVPN running on Windows VPS

Post by TinCanTech » Fri Jun 04, 2021 3:20 am


IhaveNoIdea
OpenVpn Newbie
Posts: 8
Joined: Thu Jun 03, 2021 4:33 pm

Re: Can't connect to OPenVPN running on Windows VPS

Post by IhaveNoIdea » Fri Jun 04, 2021 5:08 pm

I found out different tutorial. I managed connect to the OpenVPN via client, however there is no internet access...
Guide i was using this time https://www.reddit.com/r/OpenVPN/commen ... indows_10/
Installed 2.4.11 Windows10 server, instead of 2.5.2. (OpenVPN service was not working on the server, that was the problem before)

https://ibb.co/f0WHkCL
https://ibb.co/vQtFXf5

TAP adapter is showing that it has no network access..

Server.conf

Code: Select all

port 443
proto udp
dev tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\server.crt"
key "C:\\Program Files\\OpenVPN\\config\\server.key"
dh "C:\\Program Files\\OpenVPN\\config\\dh1024.pem"
tls-auth "C:\\Program Files\\OpenVPN\\config\\ta.key" 0
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4" 
block-outside-dns
keepalive 10 120
cipher AES-256-CBC
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1
But for several hours, im not able to find answer for this.

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

Re: Can't connect to OPenVPN running on Windows VPS

Post by TinCanTech » Fri Jun 04, 2021 5:57 pm

The easy answer is "Don't run a server on Windblows" ..

Try bebops posts here: viewforum.php?f=7

IhaveNoIdea
OpenVpn Newbie
Posts: 8
Joined: Thu Jun 03, 2021 4:33 pm

Re: Can't connect to OPenVPN running on Windows VPS

Post by IhaveNoIdea » Fri Jun 04, 2021 6:01 pm

TinCanTech wrote:
Fri Jun 04, 2021 5:57 pm
The easy answer is "Don't run a server on Windblows" ..

Try bebops posts here: viewforum.php?f=7
Im running mine on Linux, i just want to help my friend.. However i never though this will be such a nightmare.
Thank you for the tip, i will check it out :-) .

Regards.

IhaveNoIdea
OpenVpn Newbie
Posts: 8
Joined: Thu Jun 03, 2021 4:33 pm

Re: Can't connect to OPenVPN running on Windows VPS

Post by IhaveNoIdea » Sat Jun 05, 2021 8:32 pm

IhaveNoIdea wrote:
Fri Jun 04, 2021 6:01 pm
TinCanTech wrote:
Fri Jun 04, 2021 5:57 pm
The easy answer is "Don't run a server on Windblows" ..

Try bebops posts here: viewforum.php?f=7
Im running mine on Linux, i just want to help my friend.. However i never though this will be such a nightmare.
Thank you for the tip, i will check it out :-) .

Regards.
I found the solution, the installation of OpenVPN itself wasn't enough,
there is something more, that must be done and was missing from previous guides!

https://supporthost.in/setting-up-openv ... 2012-2016/

After installing and completing all steps on NAT installation, i also suggest to restart VPS. Then you will have the internet connection :) .
Hope this thread will help someone else in the future, as there was many people with this problem, but solution was never found.

Regards.

IhaveNoIdea
OpenVpn Newbie
Posts: 8
Joined: Thu Jun 03, 2021 4:33 pm

Re: Can't connect to OPenVPN running on Windows VPS

Post by IhaveNoIdea » Sun Jun 06, 2021 2:44 am

TinCanTech wrote:
Fri Jun 04, 2021 5:57 pm
The easy answer is "Don't run a server on Windblows" ..

Try bebops posts here: viewforum.php?f=7
You can mark this thread as solved, thanks ;-) .

Regards.

Locked