Skip to main content
Table of content

Install Uncomplicated Firewall (UFW) on Debian Linux

22 February, 2026

Install and configure Uncomplicated Firewall (UFW) on Debian Linux

Install UFW

# refresh package index
apt update

# install ufw
apt install ufw

Configure UFW

# allow ssh from one ip address
ufw allow from 192.168.1.100/32 to any port 22

# allow ssh from a network range
ufw allow from 192.168.1.0/24 to any port 22

# allow http and https
ufw allow 80
ufw allow 443

Enable UFW and check status

# enable ufw
ufw enable

# check status of ufw
ufw status

# check status verbose
ufw status verbose

 

 

 

# allow ssh from one ip address
ufw allow from 192.168.1.100/32 to any port 22

# allow ssh from a network range
ufw allow from 192.168.1.0/24 to any port 22

# allow http and https
ufw allow 80
ufw allow 443

Comments

Not rated
0
test
3 weeks ago
Quoting test:
asdfasdf

sam here
Like Like like 1
Quote
0
test
3 weeks ago
asdfasdf
Like Like love 1
Quote

Add comment

Your rating:

Submit
22 February, 2026