Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I opened ports 22 25 80 443 993 995

The output of ufw status is...

Status: active

To         Action      From
--         ------      ----
22         ALLOW       Anywhere
25         ALLOW       Anywhere
80         ALLOW       Anywhere
443        ALLOW       Anywhere
993        ALLOW       Anywhere
995        ALLOW       Anywhere

Is that ok? What other initial firewall setup configuration commands do you recommend?

share|improve this question
This is an impossible question to answer. If you are intending to offer ssh, smtp, imap, and pop access to the world, this is a great start! But if that's not your intent, then what you've got here may not make any sense at all. You have to configure your firewall appropriately for the services you plan to offer. – larsks Feb 6 '12 at 22:40

1 Answer 1

Indeed, as primary commenter noted this question is difficult to answer. Did you intend to offer those services to the world? If so, then it looks great. If not, well, then you should probably remove those rules by doing ufw delete [RULE] where rule is the rule you want to remove. You may also want to check and see if the logging level you want set is set. You can do this with ufw logging [LEVEL] where [LEVEL] is the level you want the firewall to log at. You can see the available [LEVEL]s by visiting the man page with the command man ufw and looking under the LOGGING header. In addition to logging you might also want to look into rate limiting, which ufw doesn't do by default but supports, for SSH if you want to be able to SSH in from anywhere, but mitigate brute force attacks. Look in the ufw manual under the OPTIONS header, it's the limit subcommand. The RULE SYNTAX header details how to use it.

share|improve this answer

Your Answer


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.