0

Currently I can't seem to connect to my Ubuntu 12.04 server unless I disable my ufw or if I do a "ufw allow ip_address".

When I do a "ufw status" I get the following:

enter image description here

I deleted the allow my ip_address and technically it should allow me to ssh into my server via that port. But it just times out. Any idea what I could be doing wrong?

1 Answer 1

1

As ssh uses port 22 by default and I only see port 8880 mentioned in the screenshot. Try the following,

sudo ufw allow ssh

If you would only want your own IP address access to ssh you could use,

sudo ufw allow from xxx.xxx.xxx.xxx to any port 22

Replace xxx.xxx.xxx.xxx with your own IP address. Please check if you have a static IP address and not a dynamic one. In general, before doing anything like this, make sure you have access to the console in some other way. Else you might end up locking yourself out.

From: UFW

3
  • but i changed my ssh port to 8880 ... which is why the screenshot shows that. also did a 'sudo ufw allow ssh' and that doesnt work neither as it added the port 22, but im not using that port. not sure why i cant connect. Commented Apr 15, 2015 at 23:35
  • "sudo ufw allow ssh" adds port 22 because the application is listed here, /etc/ufw/applications.d/openssh-server, the openssh-server still lists port 22 as the port to use. Still that only just explains why port 22 got added, not the issue you are having.
    – Sinn3d
    Commented Apr 16, 2015 at 10:46
  • Did you ever set something like "ufw default deny outgoing"? Maybe try "ufw reset" followed by "ufw allow 8880" ?
    – Sinn3d
    Commented Apr 16, 2015 at 11:01

You must log in to answer this question.

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