I am trying to configure a Ubuntu 12.04 based VPS and I have changed my ssh port from 22 to 803 and everything worked fine. After this I've installed UFW and now I can't login using SSH.

Before I enable UFW I had allowed port 803 (I have checked and its open).

I had also disabled IPV6 support and few other rules because they weren't supported by my VPS and UFW was not starting at boot.

Here are the changes I made to solve the UFW boot issue. But these have nothing to do with SSH.



If I disable UFW ssh works and allows the login.

The error I am getting is "Network connection timeout"

I have also tried changing the port back to 22. But it doesn't work.

Can anyone please point out what I am doing wrong here?

Thanks in advance.


For those having the same problem as me, this is the solution.

The file /etc/ufw/before.rules, contains a rule “-A ufw-not-local -j DROP”. This rule drops all incoming traffic.

So commenting out this line in the before.rules file will solve the problem.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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