iw4p / OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv

[Script and Docker 🐳] OpenConnect (Cisco AnyConnect) VPN Server (OCServ) script one key easy configurator and installer
255 stars 133 forks source link

HTTP 401 Cookie is not acceptable #27

Closed padfo0ot closed 1 year ago

padfo0ot commented 1 year ago

I am using this repository on 3 ubuntu servers. On 2 of them it works perfectly but I can not connect to the other one. I've tried both AnyConnect and OpenConnect.

The message from AnyConnect: The secure gateway had rejected the connection attempt.

And the logs from OpenConnect after posting the password: 18:16:48 LIB: Got HTTP response: HTTP/1.1 200 OK 18:16:48 LIB: Connection: Keep-Alive 18:16:48 LIB: Content-Type: text/xml 18:16:48 LIB: Content-Length: 189 18:16:48 LIB: X-Transcend-Version: 1 18:16:48 LIB: Set-Cookie: webvpncontext=AFYAJ.../gO4Mo.../5qps...; Secure 18:16:48 LIB: Set-Cookie: webvpn=<elided>; Secure 18:16:48 LIB: Set-Cookie: webvpnc=; expires=Thu, 01 Jan 1970 22:00:00 GMT; path=/; Secure 18:16:48 LIB: Set-Cookie: webvpnc=bu:/&p:t&iu:1/&sh:1C27B8C...; path=/; Secure 18:16:48 LIB: HTTP body length: (189) 18:16:48 LIB: TCP_INFO rcv mss 1408, snd mss 1408, adv mss 1448, pmtu 1500 18:16:48 LIB: Got inappropriate HTTP CONNECT response: HTTP/1.1 401 Cookie is not acceptable 18:16:48 Error establishing CSTP connection 18:16:50 VPN terminated with errors

It might be because of the expiration date of the cookie which is 01-01-1970. Or maybe not? How can I fix this?

Wrong. This is not the issue, as the dates on the other servers are the same: 01011970.

Any help will be appreciated. Thanks

iw4p commented 1 year ago

Seems it can not establish a connection. Maybe your third server is under watching and DPI detections. Unfortunately, I don't have any solution. Try to refund your server and get the new one with a fresh IP.

padfo0ot commented 1 year ago

I think it was related to the VPS. If anyone else had a same problem: I could solve that using a KVM VPS. It might not be compatible with the OpenVZ Servers (with an active Burst Memory).