How to Install and Configure UFW – An Un-complicated FireWall in Debian/Ubuntu

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

Pungki Arianto

Currently I am a Linux/Unix administrator. But I also play Windows both in server and desktop area. Interested in information technology, information security and writing.

Host Your Own Website at $97 Discount + One Free Domain Using our Promo Code 'Tec97' (Enter this code during Signup) - Signup with DreamHost Now!

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

You may also like...

9 Responses

  1. hurin says:

    Hi, thx for the tutorial, it really helps me out ^^

    By the way, i think there’s a small typo error with the command line => “dpkg –get-selection”
    Isn’t it “dpkg –get-selections” ?

    Anyway, great tutorial, thanks again :)

  2. Websearch2 says:

    sudo ufw allow form 192.168.0.0/24 -> should be from not form

  3. Pungki Arianto says:

    Hi websearch,

    I never use UFW to block websites. But I think we can use this trick to do it :

    sudo ufw deny out to <> port 80

    But please remember, this will block All access on port 80, on that server.

    If you need to block websites, I think a tool such as Dansguardian may a good option.

  4. websearch says:

    Thanks you.

    Tell me please
    How can blocking sites (example facebook.com)?

  5. Dave Dux says:

    I wonder if it’s possible to allow a certain port to open only if the certain application is running. Like ufw to open 51234 tcp port when I start Transmission, but close it when I close Transmission [torrent client]. That would be awesome. :)

  6. Staffan Melin says:

    Very good and simple to follow guide!

    One small error/typo below “List the current ufw rules”: The command should be
    $ sudo ufw status verbose (you forgot the “ufw”)

  7. Mark says:

    Great information, in a simple to understand tutorial. Bookmarked.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Join Over 62000+ Linux Users
  1. 48100
  2. 2222
  3. 11697
Enter your email to get latest Linux Howto's