-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Received bad header from gateway #18
Comments
Hi @mrmodolo, This error is caused by an authentification error. It usually occurs when the username/password couple is not valid. Have you checked that your credentials do work using another official VPN client? Another cause could be that we don't handle well the protocol of your VPN gateway. Do you have any information on the software version on the remote end? |
Same problem here, but I'm quite sure the password is correct as it works with the binary client. I have unfortunately no access or information about the server.
|
DEBUG: Cookie: SVPNCOOKIE=yNBN4ZFhx0N0R2EGwRi9OZdOohFBTioHQiBtVG7BEBp2iBkskef7WhsvtYXfWkHv%0aqvm6Py6gnBDmlDuaX9+6QhwzWaZsXYN/nUNTUJk6pjteVTOH75uYKgywZ27OTJee%0aTgS7H9HHQVMoluH1l2Rk5NY8Iw6SWGqbEeo+ngNi5g1oP6QXE1LBFQro4poRqdxU%0at� Seems like there's garbage at the end of the cookie? We may have parsed it wrong or just log it wrong. Given it doesn't work I'm thinking it's the first option. (I made changes there & probably broke it. Will take a look...). |
Hi! Thanks! |
Same problem here, the credentials are the same I use with the official client without any problem. If I give a wrong password to openfortivpn I get a different error message:
so I think that the authentication works correctly and the problem is somewhere else. Just in case it matters: I have to specify a Paride |
@mrmodolo @stefan-langenmaier @legovini Can you try version 1.0.1? There´s a chance that it works for you. |
It still does not work, but it behaves differently:
|
Hi! It still does not work! ➜ openfortivpn git:(master) ✗ sudo /usr/bin/openfortivpn -v -v -v -v vpn.aws.globosat.com.br:10443/ --no-routes --no-dns --trusted-cert c755c435e2ec1221dea85847c190f9b9200013780bf82cefb25b6074562df2cd ERROR: Received bad header from gateway: (raw) HTTP/1.1 403 Forbidden. |
Hi ! Thanks for your work ! Unfortunately it's not working for me either. On fortigate error message is "sslvpn_login_unknown_user" Logs from openfortivpn Or DEBUG: Config host = "XXXXXX" |
Hi, I have found the cause of this bug, it appears newer FortiOS versions use a longer hash for the SVPNCOOKIE (or maybe it's a configuration issue?). I had problems connecting to our various fortinet VPNs, which I belive are on FortiOS 5.2.x. I have created a pull request to merge this into master: Note that I have not tested this with the older VPNs which worked before, as I do not have access to one. Please ensure that everything works correctly on those before merging. |
COOKIE_SIZE was recently changed from 213 to 240 to support newer VPN versions. It seems that it was still not enough for some versions. This patchs sets it to 300 bytes. References: * #18 (comment) * #23 (comment)
Hi! Now I can connect! modolo@nibiru:~⟫ sudo openfortivpn -u modolo But after connection I think no route is set: route before connect: route after connect: Thanks, |
Hi @mrmodolo, The broken routes might be a side-effect of commit 7dca981. Could you: git checkout 38a85d1 # go back before suspicious commit
git cherry-pick 8a4ca14 ab6e879 # apply the COOKIE_SIZE fixes recompile and try again? Alternatively, if you're a NetworkManager user, you should try @lkundrak's NetworkManager-fortisslvpn plugin. It handles routes and nameservers in a more standard way. |
Hi! The same thing (now thereis no "WARN: No gateway address" when connecting) modolo@nibiru: modolo@nibiru:~⟫ sudo openfortivpn -u modolo modolo@nibiru:~⟫ route -n ^CINFO: Cancelling threads... Thanks for your time. Marcelo Módolo |
Strange... Unfortunately I don't have access to such a VPN anymore, and I don't have time neither. I'm sorry. Here are some suggestions, however:
In any case, keep feedbacking: it's appreciated. And if you find the root cause, I'll be happy to help write a fix. |
I'm just looking through older tickets. The routing issues should be solved now. There were a couple of changes to the routing code, including a fix for #25. Can this ticket be closed? (I think it was mainly about the COOKIE_SIZE which needed to be increased) |
Hi!
I am trying to connect (mygateway is https://my.gateway.com.br:10443):
sudo /usr/bin/openfortivpn my.gateway.com.br:10443 -u marcelo --no-routes --no-dns --trusted-cert c755c435e2ec1221dea85847c190f9b9200013780bf82cefb25b6074562df2cd
VPN account password:
INFO: Connected to gateway.
INFO: Authenticated.
INFO: Remote gateway has allocated a VPN.
ERROR: Received bad header from gateway:
(hex) 48 54 54 50 2f 31 2e 31 20 34 30 33 20 46 6f 72 62 69 64 64 65 6e 0d 0a 44 61 74 65 3a 20 53 61 74 2c 20 30 33 20 4f 63 74 20 32 30 31 35 20 31 33 3a 30 31 3a 32 35 20 47 4d 54 0d 0a 53 65 74 2d 43 6f 6f 6b 69 65 3a 20 20 53 56 50 4e 43 4f 4f 4b 49 45 3d 3b 20 70 61 74 68 3d 2f 3b 20 65 78 70 69 72 65 73 3d 53 61 74 2c 20 30 33 2d 4f 63 74 2d 32 30 31 35 20 31 33 3a 30 31 3a 32 35 20 47 4d 54 3b 20 73 65 63 75 72 65 3b 20 68 74 74 70 6f 6e 6c 79 3b 0d 0a 53 65 74 2d 43 6f 6f 6b 69 65 3a 20 53 56 50 4e 4e 45 54 57 4f 52 4b 43 4f 4f 4b 49 45 3d 3b 20 70 61 74 68 3d 2f 72 65 6d 6f 74 65 2f 6e 65 74 77 6f 72 6b 3b 20 65 78 70 69 72 65 73 3d 53 61 74 2c 20 30 33 2d 4f 63 74 2d 32 30 31 35 20 31 33 3a 30 31 3a 32 35 20 47 4d 54 3b 20 73 65 63 75 72 65 3b 20 68 74
(raw) HTTP/1.1 403 Forbidden.
Date: Sat, 03 Oct 2015 13:01:25 GMT.
Set-Cookie: SVPNCOOKIE=; path=/; expires=Sat, 03-Oct-2015 13:01:25 GMT; secure; httponly;.
Set-Cookie: SVPNNETWORKCOOKIE=; path=/remote/network; expires=Sat, 03-Oct-2015 13:01:25 GMT; secure; h
INFO: Cancelling threads...
INFO: Terminated pppd.
INFO: Closed connection to gateway.
INFO: Logged out.
Thanks
The text was updated successfully, but these errors were encountered: