Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

http://blog.kylemanna.com/linux/2013/04/26/ufw-vps/

http://blog.bodhizazen.net/linux/how-to-use-ufw-in-openvz-templates/

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.

share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer

You must log in to answer this question.

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