---
# System prepended metadata

title: reset tallafocs linux (ufw)

---

# reset tallafocs linux (ufw)

[font D.O.](https://www.digitalocean.com/community/questions/how-to-reset-the-firewall-on-ubuntu)

[TOC]

## restablir

### reset immediat

```= bash
sudo ufw --force reset
```

### desactivat futur (proper reinici)

```= bash
sudo ufw --force disable
```

## preparar

### denegar qualsevol entrada

```= bash
sudo ufw default deny incoming
```

### permetre qualsevol sortida

```= bash
sudo ufw default allow outgoing
```

### permetre entrada selectiva

```= bash
sudo ufw allow 22/tcp
```

### habilitar tallafocs

```=
sudo ufw --force enable
```