Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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