DefGuard / client

Best WireGuard desktop client with Multi-Factor Authentication
66 stars 9 forks source link

CRITICAL: macOS & Windows Client on Quit doesn't disconnect from VPNs #194

Open teon opened 5 months ago

teon commented 5 months ago

on macOS & Windows the client doesn't disconnect from VPN on quit. And that would be fine if the client detected that the VPN connection is still open, when I open it again.

Now - after connecting again (in the client it's not connected and I don't know it is still working) not only the VPN does not work (since it has several interfaces with the same IP configured) - but also when I use all traffic I need to REBOOT my computer since the whole network stops working.

Disconnect (invoked by hand) - works, and removes the device/stops VPN - just on quit it doesn't work.

Example after few connections and quits:

utun6: flags=8050<POINTOPOINT,RUNNING,MULTICAST> mtu 1420
    inet 10.120.121.9 --> 10.12.12.9 netmask 0xff000000
vmenet0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
utun7: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1420
    inet 10.120.121.9 --> 10.12.12.9 netmask 0xff000000
vmenet0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
utun8: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1420
    inet 10.120.121.9 --> 10.12.12.9 netmask 0xff000000
vmenet0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
rongten commented 1 month ago

Not sure if it is the same issue or if it is related, but we have a problem (on windows) with last version 0.3.0 and 0.2.2 related to the persistence of the wireguard network device. A simple example we can replicate consistently:

1) On an ADSL line, turn on defguard-client, connect to the VPN. 2) Reboot laptop without disconnecting the VPN. 3) Boot laptop and connect it to the LAN to whom defguard gives access to. 4) The wireguard tunnel and dns configurations are still active (listed from ipconfig /all)

To solve this issue, we need to turn on defguard-client, connect again the VPN, then disconnect. At this point the wireguard interface is correctly taken down and the laptop can access the lan again.