{"action":"created","issue":{"url":"https://api.github.com/repos/adrienverge/openfortivpn/issues/3","labels_url":"https://api.github.com/repos/adrienverge/openfortivpn/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/adrienverge/openfortivpn/issues/3/comments","events_url":"https://api.github.com/repos/adrienverge/openfortivpn/issues/3/events","html_url":"https://github.com/adrienverge/openfortivpn/issues/3","id":96849240,"number":3,"title":"pppd_write thread after of login","user":{"login":"k0k","id":1683959,"avatar_url":"https://avatars.githubusercontent.com/u/1683959?v=3","gravatar_id":"","url":"https://api.github.com/users/k0k","html_url":"https://github.com/k0k","followers_url":"https://api.github.com/users/k0k/followers","following_url":"https://api.github.com/users/k0k/following{/other_user}","gists_url":"https://api.github.com/users/k0k/gists{/gist_id}","starred_url":"https://api.github.com/users/k0k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k0k/subscriptions","organizations_url":"https://api.github.com/users/k0k/orgs","repos_url":"https://api.github.com/users/k0k/repos","events_url":"https://api.github.com/users/k0k/events{/privacy}","received_events_url":"https://api.github.com/users/k0k/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-23T16:12:07Z","updated_at":"2015-07-26T20:04:38Z","closed_at":null,"body":"I try connect to Fortinet 3600c and with openfortinet i received this:\r\n\r\nDEBUG:  Loaded config file \"/etc/openfortivpn/config\".\r\nDEBUG:  Config host = \"xxx.xxx.xxx.xxx\"\r\nDEBUG:  Config port = \"443\"\r\nDEBUG:  Config username = \"USER\"\r\nDEBUG:  Config password = \"********\"\r\nDEBUG:  Gateway certificate validation failed.\r\nDEBUG:  Gateway certificate digest found in white list.\r\nINFO:   Connected to gateway.\r\nINFO:   Authenticated.\r\nDEBUG:  Cookie: SVPNCOOKIE=LjCzS7t/yW9m3VhczWY0Rz9QnpYKlGla25prgY%0ao6ppc/Jeem4r1H3X+EYkiOZVt7eALp8jAfaLfvAUJWaZmyhp6gDqcbGzpLToPHrHBy/gEfuCoPCtko1lluRG/zeI`\u0001\r\nINFO:   Remote gateway has allocated a VPN.\r\nDEBUG:  pppd_read_thread\r\nDEBUG:  ssl_read_thread\r\nDEBUG:  if_config thread\r\nDEBUG:  ssl_write_thread\r\nDEBUG:  pppd ---> gateway (16 bytes)\r\npppd:   c0 21 01 01 00 0e 01 04 04 00 05 06 71 21 49 87\r\nDEBUG:  pppd_write thread\r\nERROR:  Received bad header from gateway: 4854 5450 2f31\r\nWARN:   Looks like a HTTP 403.\r\nINFO:   Cancelling threads...\r\nDEBUG:  Waiting for pppd to exit...\r\nINFO:   Terminated pppd.\r\nINFO:   Logged out.\r\nINFO:   Closed connection to gateway.\r\n\r\nWith the windows client of fortinet I can connect without problem, with openfortivpn , auth is ok, I see that problem can be pppd program, I don't sure, you have some idea?\r\n\r\ngreetings."},"comment":{"url":"https://api.github.com/repos/adrienverge/openfortivpn/issues/comments/125034055","html_url":"https://github.com/adrienverge/openfortivpn/issues/3#issuecomment-125034055","issue_url":"https://api.github.com/repos/adrienverge/openfortivpn/issues/3","id":125034055,"user":{"login":"adrienverge","id":5244945,"avatar_url":"https://avatars.githubusercontent.com/u/5244945?v=3","gravatar_id":"","url":"https://api.github.com/users/adrienverge","html_url":"https://github.com/adrienverge","followers_url":"https://api.github.com/users/adrienverge/followers","following_url":"https://api.github.com/users/adrienverge/following{/other_user}","gists_url":"https://api.github.com/users/adrienverge/gists{/gist_id}","starred_url":"https://api.github.com/users/adrienverge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrienverge/subscriptions","organizations_url":"https://api.github.com/users/adrienverge/orgs","repos_url":"https://api.github.com/users/adrienverge/repos","events_url":"https://api.github.com/users/adrienverge/events{/privacy}","received_events_url":"https://api.github.com/users/adrienverge/received_events","type":"User","site_admin":false},"created_at":"2015-07-26T20:04:38Z","updated_at":"2015-07-26T20:04:38Z","body":"I think pppd works OK (it sends correct bytes: `c0 21 01 01...`). Does its log show something strange? (Use `--pppd-log`.)\r\n\r\nAnyway, you're getting a bad response from the Fortinet gateway. You should receive traffic bytes, but you get `4854 5450 2f31...`, which is ascii for `HTTP/1...`: probably a HTTP 4xx error). A good way to debug would be to uncomment this line: [src/io.c#L350](https://github.com/adrienverge/openfortivpn/blob/6571e49/src/io.c#L350) and recompile openfortivpn. Then you would see what the gateway says..."}}