hiddify-next icon indicating copy to clipboard operation
hiddify-next copied to clipboard

Can't connect to SSH with VPN (TUN) on WSL

Open N0xFF opened this issue 1 year ago • 1 comments

Search first

  • [X] I searched and no similar issues were found

What Happened?

It's unable to connect to server via SSH when VPN is enabled. Connection stuck on expecting SSH2_MSG_KEX_ECDH_REPLY.

Reproduce the Bug

  1. Enable Service Mode -> VPN (Experimental).
  2. Connect to VPN.
  3. Connect to VPN server via SSH.

Expected Behavior

No response

Version

v0.15.15.dev

Platform/OS

Windows

Additional Context

The reason is MTU value of tun0 interface, which was 9000. After changing it to 1500 the problem was solved.

Relevant log output

debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to XXX.XXX.XXX.XXX [XXX.XXX.XXX.XXX] port 22.
debug1: Connection established.
...
debug1: Local version string SSH-2.0-OpenSSH_9.0p1 Ubuntu-1ubuntu8.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.9p1 Ubuntu-3ubuntu0.6
debug1: compat_banner: match: OpenSSH_8.9p1 Ubuntu-3ubuntu0.6 pat OpenSSH* compat 0x04000000
debug1: Authenticating to XXX.XXX.XXX.XXX:22 as 'user'
...
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Connection reset by XXX.XXX.XXX.XXX port 22

Are you willing to submit a PR? If you know how to fix the bug.

  • [ ] I'm willing to submit a PR (Thank you!)

N0xFF avatar Feb 19 '24 12:02 N0xFF

systemd enabled in wsl?! systemd status is very important. check it and log it here!

Morrigan-Ship avatar Mar 19 '24 21:03 Morrigan-Ship