I'm trying to forward port 22 so I can SSH into my PC from a different network but it doesn't seem to be working. I get the classic "Connection refused" error. I can do ssh mihkel@my_public_ip from the network that the PC is on but it doesn't work on any other network. I've made sure port 22 is allowed in the Windows Firewall and that the IP is correct.. Here is my port forwarding config:enter image description here

I have a Inteno DG400 router and the PC is connected on via Wi-Fi. I was told to keep Source Port(s) empty but I cannot save the config if it is empty.

Update: I've tried to set firewall rule to allow access to port 22, still I have the same problem. Nothing has changed. Here are the settings for the firewall rules:enter image description here

  • 1
    So your ISP is probably blocking incoming connections to port 22. Try other ports. You only need to change the “Source Port”. – Daniel B Nov 7 at 15:54
  • 1
    This router's "Source Port" is slightly mislabeled; it really means the destination port of the original packet from the source zone. So while a real source port field would indeed be kept empty, that doesn't apply here and setting it to some value is correct. – grawity Nov 7 at 15:59
  • So, uh, just to be sure: You see your public IP address on the router’s status page, right? Is it the same IP you see when using a web service for checking your public IP? – Daniel B Nov 8 at 11:45
  • @DanielB yes and yes. – Mihkel Nov 8 at 15:56

Your settings seem correct, and Source Port should certainly not be empty when doing port-forwarding (or there is nothing to forward).

So it seems that port 22 is being blocked. It works when you self-loop from your computer to your computer through the router, but does not work from the real Internet.

To find out why it is blocked, check first the router if this port is not allowed. The manual for your router is basically empty, so you will have to find it out the hard way from the router's login page. Ports are often called "services" and this is normally found in the Firewall section of the settings.

Once you are sure that the port should not be blocked on your side, this leaves your ISP.

Try a service such as GRC | ShieldsUP!, option Common Ports, to see which ports are open, and check port 22.

If port 22 is blocked, this means that either your router is still blocking it, or that the ISP does. If any other port is open, you might use it as the Source port instead of port 22.

If none of the above worked, contacting your ISP Support might help.

Note: The router might have a DMZ setting to direct everything to your computer. Avoid it, as it is too dangerous.

  • None of the ports are open in the "Common Ports" section of ShieldsUP!, all of them are listed as: "Stealth: There is NO EVIDENCE WHATSOEVER that a port (or even any computer) exists at this IP address!". Does this mean they are closed? – Mihkel Nov 7 at 19:35
  • It means that there is no acknowledgement when addressing these ports. The likely explanation is that the router's firewall doesn't acknowledge the requests, since an ISP is unlikely to close all of them. – harrymc Nov 7 at 19:38
  • Hmm, what can I do about this? Does it have anything to do with firewall rules? – Mihkel Nov 7 at 19:41
  • It has everything to do with firewall rules. I cannot find a manual for your router, but search for services to authorize. The service name might even be "SSH". Otherwise, add a firewall rule to let port 22 through from any IP address. – harrymc Nov 7 at 19:50
  • Ok Thanks, I have to be heading to bed now, but I'll pick up tomorrow with the firewall rules. I appreciate the help so far. – Mihkel Nov 7 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.