I have a desktop at home that connects to a router, I had set up ssh port forwarding, allowed firewall access on the corresponding port and changed ssh config to listen to the specific port. It was all working correctly, I could ssh to my desktop remotely (from workplace). But recently we switched our internet provider, so brand new router etc, I went on to do all the same thing I had done before, but now seems like I cannot access to my desktop from remote computers (even with a laptop on the same local wireless network).

So both on the remote computer or a laptop in the same local wireless network, I would get the Connection timed out error, and if I ping my router's public ip adress, it shows 0 received: 50 packets transmitted, 0 received, 100% packet loss, time 50032ms. Site like CanYouSeeMe.org shows that it can see my port.

Any suggestions? Thanks


So from the related post below, someone suggested that

Some ISPs use a system called CG-NAT to use one IP address for multiple connections, due to the global shortage of IPv4 addresses. This would prevent any incoming connections, and is typically used only on entry-level plans.

I wonder could this be true? How could this prevent any incoming connections, for example, the browser is sending request outward and getting result back all the time.

There is a related issue Bell Home Hub 2000 Port Forwarding.


As suggested by davidbaumann in the comment section, I tried to access to the host on an external network just to make sure (I tried a while ago and it didn't work, so I have been testing access just from my local network), and it logged it, even though ssh username@host_public_ip_adress -p external_port still does not work in a local network, can someone explain?

  • 2
    When you're attempting a connection to the SSH server locally, are you using the local address or the router's address? Also, some ISPs block port 22 for security purposes, if you're using the default port. – dsstorefile1 Apr 17 '18 at 2:38
  • when I ssh from a local laptop, I put down the router's public address. I changed the port to something else other than the default 22, which was recommended as a safe measure. – Sam Apr 17 '18 at 2:41
  • @dsstorefile Since you mentioned, so I tried ssh username@host_local_ip_adress -p internal_port and it worked – Sam Apr 17 '18 at 2:51
  • When using another port is recommended, it is usually the "public" port that changes. So we have multiple devices behind NAT on 22, but a different public port for each? It does not hurt to change the private ports though. – mckenzm Apr 17 '18 at 4:05
  • @mckenzm The private port you mean is the internal port right? public port as the external port. If so, I also had changed the internal port to non default. – Sam Apr 17 '18 at 4:24

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.