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:
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:
1 Answer
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 manualfor 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 asGRC | 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.
14