0

I am trying to configure a raspberry pi zero w so that my group and I can connect to it remotely. I have done this a few times before, but have recently hit a snag.

I have set up SSH to be listening in on port 11420 on my pi. I have verified this using netstat:

ports open on pi

Over LAN, I AM able to connect to the pi with ssh without a hitch. Things get strange when I try to connect over the internet. I have done port forwarding for ssh on r-pis and servers in the past, but I am having serious issues this time. I have a Spectrum router, model SAC2V2S, and have opened external port 11420 and pointed to internal port 11420 on the pi. For whatever reason, any time I try to connect using BitVise SSH client I get this error:

"Connection failed. FlowSocketConnector: Failed to connect to target address. Windows error 10061: No connection could be made because the target machine actively refused it."

I have been playing around by switching the external ports up. I changed the external port to 22 and the problem continues, however when I changed the external port to 120 the error code changed to 10060. I AM able to connect to ssh on the pi itself using ssh localhost when I set the port to 22. Using canyouseeme.org I have verified that the external ports have been open in every case. Furthermore, I have also tried connecting to SSH using JuiceSSH on my phone over LTE; the app continuously asks me for my password. Just as a quick sanity check, I have also verified that everything is on the same network and there are no other r-pis on my home network; its just my desktop and the pi in question.

At first I thought this might be an issue with my firewall on the pi, so I verified that ufw is set to allow ssh and to allow the ports in question. I even went as far as disabling ufw entirely and I still get the same error in bitvise. Finally, I just went ahead and unplugged the pi and tried connecting to it. When this happens, I get a similar error saying that the connected host has failed to respond as expected.

4
  • Are you behind a CGNAT by chance? Switching the ports won't do anything if you are unable to forward the traffic on the port to your device. You have allowed the traffic on your device, but have you forwarded the traffic, to that device? Being able to connect with localhost only verifies the service is configured.
    – Ramhound
    Commented Dec 24, 2021 at 17:38
  • I compared my public IP address on my router to what ipchicken.com says and they match, so I don't believe I am behind a CGNAT Commented Dec 24, 2021 at 17:47
  • Are you actually trying to connect over the internet, or are you just connecting to your WAN address from within the same LAN as the Pi is? Does the Pi at least receive the packets in question (use termshark/tcpdump to verify)? Commented Dec 25, 2021 at 8:52
  • I used tcpdump and got nothing. I am currently using ngrok as a workaround, I suspect my ISP may be blocking inbound traffic. Commented Dec 26, 2021 at 16:43

0

You must log in to answer this question.

Browse other questions tagged .