theinvisible / openfortigui

VPN-GUI to connect to Fortigate-Hardware, based on openfortivpn
https://hadler.me/linux/openfortigui/
GNU General Public License v3.0
489 stars 54 forks source link

VPN Disconnection issues #113

Closed virresh closed 3 years ago

virresh commented 4 years ago

I am experiencing constant VPN disconnection within few minutes of a successful connection. Here is the relevant log for that particular VPN connection. I'm not sure what exactly the issue might be. It's possible the issue is from VPN server's end, but I don't experience it with the official forticlient on windows.

INFO:   Start tunnel.
INFO:   Connected to gateway.
INFO:   Authenticated.
INFO:   Remote gateway has allocated a VPN.
Using interface ppp0
Connect: ppp0 <--> /dev/pts/1
INFO:   Got addresses: [10.212.134.165], ns [1.1.1.9, 1.1.1.9]
INFO:   negotiation complete
INFO:   negotiation complete
local  IP address 10.212.134.165
remote IP address 192.0.2.1
primary   DNS address 1.1.1.9
secondary DNS address 1.1.1.9
INFO:   Interface ppp0 is UP.
INFO:   Setting new routes...
INFO:   Adding VPN nameservers...
INFO:   Tunnel is up and running.
No response to 4 echo-requests
Serial link appears to be disconnected.
Connect time 97.6 minutes.
Sent 4175795 bytes, received 31938252 bytes.
Connection terminated.
Modem hangup
ERROR:  read: Input/output error
INFO:   Cancelling threads...
INFO:   Setting ppp interface down.
INFO:   Restoring routes...
WARN:   Could not delete route through tunnel (No such device).
INFO:   Removing VPN nameservers...
INFO:   pppd: The link was terminated by the modem hanging up.
INFO:   Terminated pppd.
INFO:   Closed connection to gateway.
INFO:   Setting ppp interface down.
INFO:   Restoring routes...
WARN:   Could not delete route to vpn server (No such process).
INFO:   Removing VPN nameservers...
INFO:   Logged out.
theinvisible commented 4 years ago

You can try the latest version which also has an updated openfortivpn core module. If the problem still occurs please try with openfortivpn directly and lets see the results.

BNolet commented 4 years ago

I can confirm this is still an issue on version 0.9.0 on Ubuntu 20.04. Log is slightly different, however.

DEBUG:  pppd ---> gateway (69 bytes)
No response to 4 echo-requests
Serial link appears to be disconnected.
Connect time 4.5 minutes.
Sent 390931 bytes, received 506778 bytes.
DEBUG:  pppd ---> gateway (25 bytes)
DEBUG:  pppd ---> gateway (25 bytes)
DEBUG:  gateway ---> pppd (107 bytes)
DEBUG:  gateway ---> pppd (110 bytes)
DEBUG:  gateway ---> pppd (54 bytes)
DEBUG:  gateway ---> pppd (110 bytes)
DEBUG:  gateway ---> pppd (110 bytes)
Connection terminated.
Modem hangup
ERROR:  read: Input/output error
INFO:   Cancelling threads...
INFO:   Setting ppp interface down.
INFO:   Restoring routes...
DEBUG:  ip route del to 66.46.x.x/255.255.255.255 via 192.168.4.1 dev wlp2s0
DEBUG:  ip route del to 0.0.0.0/0.0.0.0 dev ppp0
WARN:   Could not delete route through tunnel (No such device).
DEBUG:  ip route add to 0.0.0.0/0.0.0.0 via 192.168.4.1 dev wlp2s0
INFO:   Removing VPN nameservers...
INFO:   Setting ppp interface down.
INFO:   Restoring routes...
DEBUG:  ip route del to 66.46.x.x/255.255.255.255 via 192.168.4.1
WARN:   Could not delete route to vpn server (No such process).
DEBUG:  ip route del to 0.0.0.0/0.0.0.0
DEBUG:  ip route add to 0.0.0.0/0.0.0.0 via 192.168.4.1
INFO:   Removing VPN nameservers...
DEBUG:  Waiting for pppd to exit...
DEBUG:  waitpid: pppd exit status code 16
INFO:   pppd: The link was terminated by the modem hanging up.
INFO:   Terminated pppd.
INFO:   Closed connection to gateway.
DEBUG:  server_addr: 66.46.x.x
DEBUG:  server_port: 443
DEBUG:  gateway_addr: 66.46.x.x
DEBUG:  gateway_port: 443
DEBUG:  Setting cipher list to: HIGH:!aNULL:!kRSA:!PSK:!SRP:!MD5:!RC4
DEBUG:  Gateway certificate validation succeeded.
INFO:   Logged out.
virresh commented 4 years ago

I tried the openfortivpn from ubuntu repository (1.6.0, which is older than the latest version on github), however the problem remains.

I just noticed that whenever VPN was connected, the wifi icon near battery and volume turned into question marks (I'm on gnome shell 3.28.4)

Stumbled on this https://askubuntu.com/a/1029415/840304 answer, and it seems my network disconnections have become almost non-existent after this change

I was able to work on my VPN for up to 6 hours continuously (the max that I could test), so I think it should not have troubles in working longer than that as well. Still no clue if this is an actual solution or I just got lucky. Couldn't find any convincing explanation as to why these two things are related if at all. One thing that I do know is, if I turn on that option, VPN starts disconnecting frequently again

theinvisible commented 3 years ago

Thanks, network related problems are really hard to find but i think this is not related to OpenFortiGUI himself. I will close this now.