0

When on the same network it works fine with either the global or local IP address being used.

I am forwarding port 22 like this:

IP Address  Start Port  End Port    IP Address  Start Port  End Port    Prot
localip         22         22        globalip       22         22       BOTH

I made sure port 22 was open like this on the server: sudo ufw allow 22/tcp

How do I fix this?

2
  • Are you sure your global IP is a global IP and not another RFC 1918 private address from another range? You could have another NAT gateway upstream of you (maybe your broadband modem is acting as a NAT gateway without you realizing it), and you may need to do port forwarding on that gateway as well. What are the first two octets (dotted-decimal segments) of your gateway's WAN-side IP address?
    – Spiff
    Commented Sep 5, 2015 at 0:03
  • @Spiff 72.230 is the fist two
    – person
    Commented Sep 5, 2015 at 18:01

1 Answer 1

0

SSH (port 22) is one of the most-attacked ports on the Internet along with certain standard Windows file sharing ports. Some ISPs block connections to these ports by default. Check with your ISP to see if they block that by default, and if so, if they can disable it for your line/account.

4
  • Would a Port like 1000 work
    – person
    Commented Sep 3, 2015 at 18:21
  • 1
    @person Yes, your ISP probably doesn't block all ports, so you could set port 1000 on your NAT gateway's public IP address to forward to port 22 on your sshd server box. Then from your ssh client, remember to add -p 1000 when connecting from outside your network. If using scp, note that it's -P 1000 with a capital 'P'. Not sure why the OpenSSH developers didn't keep that the same between tools, but whatever.
    – Spiff
    Commented Sep 3, 2015 at 18:44
  • I just tried it and it is still not working the connection times out after trying to connect.
    – person
    Commented Sep 3, 2015 at 22:51
  • etimedout (connection timed out)
    – person
    Commented Sep 3, 2015 at 22:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .