holzschu / a-shell

A terminal for iOS, with multiple windows
BSD 3-Clause "New" or "Revised" License
2.72k stars 117 forks source link

Possible issue with Netcat and Telnet installed on a-shell #534

Open rkeepers opened 1 year ago

rkeepers commented 1 year ago

Hi, This is a great app! I am now able to do a lot of network troubleshooting with just my iPad instead of dragging a laptop along.

I was playing around with Netcat and decided to port scan one of my servers from a random IP address that would normally be blocked by the server's firewall. Oddly, it found port 21 (ftp) was open. So I used telnet to test the port and telnet showed the connection succeeded. I found this odd because there is no ftp server installed on the server and all ports except for 80 and 443 are blocked.

I tried this from my Mac and could NOT connect with telnet and Netcat said port 21 was not open. I even logged into the server and tried telnetting to port 21 on localhost and it showed connection failed (as it should with no ftp service). After running around in circles trying to figure this out, I opened a-shell again and I tried telnetting to a bogus IP address (1.3.2.1) on port 21 and it showed connected. Then I used Netcat to scan port 21 and it told me it was open!

Any idea what might be happening? I'll try and attach a screenshot.

IMG_2191

holzschu commented 1 year ago

This is puzzling. I have no idea what is happening. On my side:

...which means I have even fewer clues about the issue. If you tested many machines before that one, it could a variable that was not properly reset (but the fact that it's happening for multiple commands makes that unlikely). If force-quitting a-Shell and restarting the commands changes the result, then that's a clue. Otherwise, I really don't know.

rkeepers commented 1 year ago

It is a strange issue. I'm going to test it from some other locations. (sidenote: I force quit a-shell, rebooted the iPad, no change) I have a VPN and when I engaged that, the connection failed on all of the remote end points I tried, which is correct. There must be something locally going on. I'll comment back if I discover a pattern. Thank you for getting back to me so quickly!