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.

Your name can also be listed here. Work as a Paid freelancer/writer at TecMint.

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...

7 Responses

  1. Websearch2 says:

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

  2. 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.

  3. websearch says:

    Thanks you.

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

  4. 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. :)

  5. 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”)

  6. 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. 46679
  2. 2055
  3. 10101

Enter your email to get latest Linux Howto's