View Full Version : [ubuntu] can't ssh from external net

January 12th, 2013, 11:18 PM
With a new install of 12.04, I cannot ssh (or connect to any port) from an external network:

from local net to Mac = works
from local net to Ubuntu = works
from external net to Mac = works
from external net to Ubuntu = Connection timed out

Because of the above testing, and with swapping in/out equipment, I'm convinced it's not a port mapping problem, etc. I've tested from http://canyouseeme.org too, with identical results.

Hints, anyone?

January 12th, 2013, 11:33 PM
What ports are you forwarding? What port is the Ubuntu ssh server listening on? You can't use port 22 externally for both machines - you can only forward one port to one IP, unless the router has some sort of port triggering to switch them on the fly. Otherwise, you'll have to use some other unused port and forward that to the second machine.

Some routers can forward a source port to a different destination port. If so, you can keep the Ubuntu ssh server listening on port 22 but have the router forward some other port to port 22 on that IP. If your router can't forward a port to a different destination port number, you'll have to change what port the ssh server listens on to the same port.

January 12th, 2013, 11:51 PM
The ports I want to forward are 4280 and 4282 (CrashPlan); I just described the problem using ssh as a simple example. Ubuntu is listening correctly on 22 and on those ports. I reconfigure the router between tests: forward 22 to my Mac, test successfully, forward 22 to my Ubuntu box, test unsuccessfully. I don't need for source/destination ports to be different.

January 13th, 2013, 02:27 AM
Could be a routing problem. Can you ping the internet from your Ubuntu server?

January 13th, 2013, 10:31 PM
You're right, it was routing. My net used to be 10.0.x.x but is now 192.168.0.x, and some remnants were left behind. Once I cleaned everything up, it started working. Thanks!