> For the complete documentation index, see [llms.txt](https://pascalgolla.gitbook.io/knowledge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pascalgolla.gitbook.io/knowledge/network/firewalls.md).

# Firewall

An overview of firewalls and how to use them

![Firewall](https://1468393421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M03x0eNy3rGD4mNtwvZ%2Fuploads%2Fgit-blob-5e14a91320a7d8a7c52f34844aaaf52693d14824%2FFirewall.png?alt=media)

A **Firewall** is a must-have component in every computer or server security concept. The firewall controls all network traffic based on an applied rule set. These rules can be used for the **incoming and outgoing** network packages.

In a very basic view, the firewall scans all incoming and outgoing packages send over it. If the packages are correct and allowed inside (or outside) the computer, the firewall forwards the packages further to other software components. Else the firewall blocks the packages (throws them away).

## Linux firewall overview

### `IPtables`

`iptables` part of the netfilter project

{% hint style="info" %}
tbd
{% endhint %}

### NFTables

`nftables`

### `UFW` Uncomplicated Firewall

As the name implies UFW is an uncomplicated Firewall that eases the use of the complicated iptables settings. Generally, UFW rules can be applied with ease and are more readable.

To open the SSH port for incoming and outgoing traffic with UFW, only this command has to be typed:

```shell
ufw allow ssh
```

Take a look at the [UFW page](/knowledge/network/firewalls/ufw.md) for more details.
