I have an openssh-server running on my computer. However, I'm not able to connect to it from outside my LAN.

Connecting from within LAN is no problem at all, it works just as one would expect. However I get a "connection timed out"-message when trying to connect from outside LAN.

I've already port-forwarded port 22 in my router, so this is not the issue. This problem arose after me having reinstalled my computer. Before this, I had no issues.

Is it a firewall issue in Ubuntu 11.10? How do I solve this?

EDIT: I also noticed that this issue isn't limited to port 22, but all ports.

  • If you can connect from your LAN but can't from outside, I'm pretty sure it's port forwarding issue (provided your machine has just one network interface connected to LAN and accessing internet via NAT) – Sergey Jan 31 '12 at 11:33

Yes, the firewall is most likely running and preventing incoming connections. Look up ufw (Universal Firewall) and how to open port 22 for incoming connections.

  • Solved it by typing "apt-get purge ufw". I'm guessing that's a bad solution, since I probably no longer have a firewall. How should I re-protect myself? Also: is it worth it? I am behind an NAT, after all. I'm guessing it pretty much does what a firewall would do? – Touzen Jan 31 '12 at 17:53
  • NAT is not a good substitute for a firewall. Personally, I would much rather use the firewall, properly configured. But if that's the way you roll... – Tim Jan 31 '12 at 22:31

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.

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