Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UFW cheatsheet #1

Merged
merged 1 commit into from Aug 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
73 changes: 73 additions & 0 deletions ufw.md
@@ -0,0 +1,73 @@
# UFW Firewall

## General

### Status (List all current rules)

```
sudo ufw status verbose
```

### Enable

```
sudo ufw enable
```

### Disable

```
sudo ufw disable
```

### Reset UFW rules

```
sudo ufw reset
```

## Block

### IP-address

```
sudo ufw deny from 15.15.15.51
```

### Deny outgoing from port

```
sudo ufw deny out 25
```

### Deny to Network interface

```
sudo ufw deny in on eth0 from 15.15.15.51
```

## Allow

### IP-address

```
sudo ufw allow from 15.15.15.15
```

### Subnet to specific port

```
sudo ufw allow from 15.15.15.0/24 to any port 22
```

### Service

```
sudo ufw allow https
```

### Port

```
sudo ufw allow 25
```