mycelium icon indicating copy to clipboard operation
mycelium copied to clipboard

Could not connect to machines created from the dashboard using mycelium on windows

Open khaledyoussef24 opened this issue 1 year ago • 2 comments

Description :

while testing Mycelium on Windows and Myceloumflut

Mycelium worked fine on Windows. I could easily ping Mycelium using ping -6 <mycelium_ip> and communicate with other machines having mycelium installed and the binary running : telegram-cloud-photo-size-4-5778481758210212434-y telegram-cloud-photo-size-4-5778481758210212441-y

but could not do the same to machines deployed from the grid from windows Screenshot 2024-10-07 at 4 02 49 PM

khaledyoussef24 avatar Oct 10 '24 05:10 khaledyoussef24

Can you try to ping the IP instead of trying to ssh to it?

LeeSmet avatar Oct 10 '24 08:10 LeeSmet

@LeeSmet pinging ips works fine with me telegram-cloud-photo-size-4-5773790133504558003-y

khaledyoussef24 avatar Oct 13 '24 10:10 khaledyoussef24

Given that ping works fine, this indicates that mycelium itself seems to be functioning as expected and delivers packets. Connection timed out would suggest then that the tcp connection handshake, or later ssh connection handshake doesn't complete, i.e. packets are lost/dropped. I'd suggest to try and ssh to the machine using another transport (regular ipv6/public ipv4 if that is available/wireguard). If that works, check if there are firewall rules and what those are, if the ssh server is listening on addresses which include the mycelium interface, and if there is nothing there, tcpdump the mycelium interface to see if any packets actually do come in for the ssh connection

LeeSmet avatar Oct 14 '24 08:10 LeeSmet

Mycelium worked fine on Windows but could not do the same to machines deployed from the grid from windows

Hi @khaledyoussef24 Could you try to change Windows with other OS, like Linux or macos with mycelium binary from this repo (not from myceliumflut repo)

iwanbk avatar Oct 15 '24 04:10 iwanbk

Working fine on both linux and macos

And has the abiltiy to connect to machines with mycelium created on the grid

khaledyoussef24 avatar Oct 21 '24 14:10 khaledyoussef24

OK, i can reproduce it, using command line mycelium, not the flutter one.

Did few scenarios

  1. windows to Linux(my PC)
  • ping OK
  • ssh OK

2.Linux (my PC) to Linux on grid

  • ping OK
  • SSH OK
  1. Windows to Linux on grid
  • ping OK
  • ssh : failed
ssh: connect to host 4d3:395f:77d0:e398:ff0f:0:400:2 port 22: Connection timed out
  1. flutter macos to Linux on grid:
  • ping: OK
  • ssh : OK

iwanbk avatar Oct 22 '24 10:10 iwanbk

I got the error log

thread 'tokio-runtime-worker' panicked at C:\Users\Administrator\mycelium\mycelium\src\tun\windows.rs:64:40:
range end index 1452 out of range for slice of length 1400
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

And found that max packet size and MTU are 1400 instead of 1500. Sent the fix on #484

iwanbk avatar Oct 23 '24 04:10 iwanbk

myceliumflut latest version made by Iwan worked fine and while running the app ,I could connect to machines on the grid using mycelium ip telegram-cloud-photo-size-4-5819062692281960362-y

khaledyoussef24 avatar Oct 23 '24 09:10 khaledyoussef24

It was using myceliumflut. shall we consider this as done ?

khaledyoussef24 avatar Oct 23 '24 09:10 khaledyoussef24

shall we consider this as done ?

It will be done after #485 getting merged.

The binary i sent to you is a PoC of this solution.

iwanbk avatar Oct 23 '24 11:10 iwanbk