lucasburlingham.me

UFW Command Reference

Published: 02 November 2024

Please note that for anything you may need to change (port number, IP address, etc), the contenteditable attribute has been added. You may click on this content and edit it as if it were a text box, while retaining highlight & copy functionalities.

Basic Commands

Default behavior

By default, UFW is set to deny all incoming and allow all outgoing traffic. This is a good starting point for most users.

To change this, you can use the following commands:

Allowing Traffic on a specific port

Filter by protocol

Deleting Rules

Logging

Block an interface

Block an IP address

Command with (most) UFW elements included

References