Cannot create connection to VPN Gate manually

Post your questions about VPN Gate Academic Experiment Service here. Please answer questions if you can afford.
Post Reply
vibabich
Posts: 7
Joined: Thu Dec 25, 2025 10:06 am

Cannot create connection to VPN Gate manually

Post by vibabich » Sat Dec 27, 2025 9:07 am

I can connect to any VPN Gate Public server from the list provided by Client Manager.
However if I manually create connection with absolutely the same properties (Add VPN Connection -> Properties...)
it fails to connect with error:

Code: Select all

Error (Error Code 1):
Connection to the server failed. Check network connection and make sure that address and port number of destination server are correct.
What is the reason and how to save all properties of automatic connection to make it persistent?
(Menu options "Copy" and "Export VPN connection properties" are grayed and not available)

solo
Posts: 1789
Joined: Sun Feb 14, 2021 10:31 am

Re: Cannot create connection to VPN Gate manually

Post by solo » Sat Dec 27, 2025 10:43 am

Post an example of "absolutely the same properties" which fails to connect.

vibabich
Posts: 7
Joined: Thu Dec 25, 2025 10:06 am

Re: Cannot create connection to VPN Gate manually

Post by vibabich » Sun Dec 28, 2025 12:32 pm

Hi solo.
This is Manager window.
Manager.PNG
This is automatic connection properties displayed in "Connected" state
ac.PNG
This is manual connection "vib" properties displayed in "Offline" state
mc.PNG
They seems identical.
If I disconnect "VPN Gate Connection" and try to connect "vib" it never succeeds.
Pop-up window shows error every 15 sec.
You do not have the required permissions to view the files attached to this post.

solo
Posts: 1789
Joined: Sun Feb 14, 2021 10:31 am

Re: Cannot create connection to VPN Gate manually

Post by solo » Sun Dec 28, 2025 1:09 pm

Incorrect, enter these...

name: Corrected
host: 219.100.37.28/tcp
port: 443
vhub: VPNGATE
user: vpn
pass: vpn

vibabich
Posts: 7
Joined: Thu Dec 25, 2025 10:06 am

Re: Cannot create connection to VPN Gate manually

Post by vibabich » Sun Dec 28, 2025 3:17 pm

Thanks, solo.
It did not work so far. I forgot to tell you that only UDP mode works with auto connection in my case.
When I choose tcp with auto connection it ends up with:

Code: Select all

Error (Error Code 2):
Protocol error occurred. Error was returned from the destination server.
The same happened when I entered Host Name: 219.100.37.28/tcp in "vib" connection properties window.
However, If I enter 219.100.37.28/udp then I come back to the previous case:

Code: Select all

Error (Error Code 1):
Connection to the server failed. Check network connection and make sure that address and port number of destination server are correct.
Besides, I could not found where to enter "pass: vpn". There is no field for password in my case.
What else can I do?

solo
Posts: 1789
Joined: Sun Feb 14, 2021 10:31 am

Re: Cannot create connection to VPN Gate manually

Post by solo » Sun Dec 28, 2025 9:54 pm

Vib, just click on "Auth Type" and proceed as advised.

vibabich
Posts: 7
Joined: Thu Dec 25, 2025 10:06 am

Re: Cannot create connection to VPN Gate manually

Post by vibabich » Mon Dec 29, 2025 4:39 pm

Nope. When I choose Standard Password Authentication and set user:vpn, password:vpn same error appeared:

Code: Select all

Error (Error Code 1):
Connection to the server failed. Check network connection and make sure that address and port number of destination server are correct.
I used Wireshark to record connection and noticed that Automatic (successful) connection starts with UDP packet:
wirwshark1.PNG
But manual "vib" connection (failed) always starts with TCP packet:
wirwshark2.PNG
I guess I should manually set UDP protocol for the connection but I do not know how to do it.
You do not have the required permissions to view the files attached to this post.

solo
Posts: 1789
Joined: Sun Feb 14, 2021 10:31 am

Re: Cannot create connection to VPN Gate manually

Post by solo » Tue Dec 30, 2025 6:48 am

VPN Gate: "Use TCP Protocol (Ethernet over HTTPS VPN) (Recommended)"

Look, here is my TCP session to the same server...
.
wireshark-manually-added-vpngate-219.100.37.13-tcp-session.png
.
For a test, temporarily disable your firewall(s).
You do not have the required permissions to view the files attached to this post.

vibabich
Posts: 7
Joined: Thu Dec 25, 2025 10:06 am

Re: Cannot create connection to VPN Gate manually

Post by vibabich » Tue Dec 30, 2025 12:57 pm

Unfortunately I cannot use this option:
VPN Gate: "Use TCP Protocol (Ethernet over HTTPS VPN) (Recommended)"
As I said above it ends up with error:

Code: Select all

Error (Error Code 2):
Protocol error occurred. Error was returned from the destination server.
Firewalls are turned off both on Windows machine and router.
So I have to select this:
VPN Gate: "Use UDP Protocol (Ethernet over UDP VPN)"
Then Auto connection is established with no problem.
But I cannot reproduce this mode with manual connection.

solo
Posts: 1789
Joined: Sun Feb 14, 2021 10:31 am

Re: Cannot create connection to VPN Gate manually

Post by solo » Wed Dec 31, 2025 1:12 am

So it's your gov blocking VPNs. Luckily you can still use UDP as they have not considered it (yet). In this case, save the following as "VPNGATE_UDP.vpn" file and then simply double-click on it.

Code: Select all

declare root
{
	bool CheckServerCert false
	uint64 CreateDateTime 0
	uint64 LastConnectDateTime 0
	bool StartupAccount false
	uint64 UpdateDateTime 0

	declare ClientAuth
	{
		uint AuthType 1
		byte HashedPassword H8N7rT8BH44q0nFXC9NlFxetGzQ=
		string Username vpn
	}
	declare ClientOption
	{
		string AccountName VPNGATE_UDP
		uint AdditionalConnectionInterval 1
		uint ConnectionDisconnectSpan 0
		string DeviceName VPN
		bool DisableQoS false
		bool HalfConnection false
		bool HideNicInfoWindow false
		bool HideStatusWindow false
		string Hostname 219.100.37.7
		string HubName VPNGATE
		uint MaxConnection 1
		bool NoRoutingTracking false
		bool NoTls1 false
		bool NoUdpAcceleration false
		uint NumRetry 4294967295
		uint Port 443
		uint PortUDP 9400
		string ProxyName $
		byte ProxyPassword $
		uint ProxyPort 0
		uint ProxyType 0
		string ProxyUsername $
		bool RequireBridgeRoutingMode false
		bool RequireMonitorMode false
		uint RetryInterval 15
		bool UseCompress false
		bool UseEncrypt true
	}
}

vibabich
Posts: 7
Joined: Thu Dec 25, 2025 10:06 am

Re: Cannot create connection to VPN Gate manually

Post by vibabich » Wed Dec 31, 2025 9:33 am

Hello solo.
Step by step I am moving forward thanks to your hints.
First I failed to connect with the config you provided, the same Error Code 1.
Then I checked Wireshark capture for auto connection and noticed that UDP port was different.
I changed "uint PortUDP" in the config file to the value captured by Wireshark: 38033
I had also to change "string Hostname" to 219.100.37.13 because the old one no longer appear in the VPN Gate server list
And woila! Manual connection established.
Here is my working config:

Code: Select all

declare root
{
	bool CheckServerCert false
	uint64 CreateDateTime 0
	uint64 LastConnectDateTime 0
	bool StartupAccount false
	uint64 UpdateDateTime 0

	declare ClientAuth
	{
		uint AuthType 1
		byte HashedPassword H8N7rT8BH44q0nFXC9NlFxetGzQ=
		string Username vpn
	}
	declare ClientOption
	{
		string AccountName VPNGATE_UDP2
		uint AdditionalConnectionInterval 1
		uint ConnectionDisconnectSpan 0
		string DeviceName VPN
		bool DisableQoS false
		bool HalfConnection false
		bool HideNicInfoWindow false
		bool HideStatusWindow false
		string Hostname 219.100.37.13
		string HubName VPNGATE
		uint MaxConnection 1
		bool NoRoutingTracking false
		bool NoTls1 false
		bool NoUdpAcceleration false
		uint NumRetry 4294967295
		uint Port 443
		uint PortUDP 38033
		string ProxyName $
		byte ProxyPassword $
		uint ProxyPort 0
		uint ProxyType 0
		string ProxyUsername $
		bool RequireBridgeRoutingMode false
		bool RequireMonitorMode false
		uint RetryInterval 15
		bool UseCompress false
		bool UseEncrypt true
	}
}

Next I tried Auto connection to another server from the list and found that UDP port was different:
Server IP: 219.100.37.55, UDP Port: 18850
I updated these settings in .vpn config file and Manual connection was successful again.
I suppose each server somehow assigns random UDP port for the client
Am I right? If so, how to modify .vpn config file that UDP port could be determined during connection?

solo
Posts: 1789
Joined: Sun Feb 14, 2021 10:31 am

Re: Cannot create connection to VPN Gate manually

Post by solo » Wed Dec 31, 2025 10:11 am

The 219.100.37.7:9400 server continues to work for me right now, your VPN blocking predicament may be harder than anticipated. Yeah, UDP port numbers are random but appear to be static.

You can use a simple app like "LiveTcpUdpWatch" to find out UDP port numbers.

vibabich
Posts: 7
Joined: Thu Dec 25, 2025 10:06 am

Re: Cannot create connection to VPN Gate manually

Post by vibabich » Wed Dec 31, 2025 2:10 pm

My goal is to get appropriate config to connect Linux machine to VPN Gate server.
I took account settings from Windows .vpn that was successfully tested (see my previous post) and pasted it into Linux vpn_client.config file. After that Linux perfectly connected to VPN Gate.
The only problem is that when I need to change VPN Gate server I have to use Windows Auto connection to determine appropriate UDP port.

Post Reply