UFW Uncomplicated Firewall Part I

Опубликовано: 29 Сентябрь 2024
на канале: ijc
610
1

UFW: uncomplicated firewall
Install UFW
systemd
upstart

Arch Linux:
Debian/Ubuntu

Use UFW to Manage Firewall Rules:
Set Default Rules
sudo ufw default allow outgoing (computer) =] (internet)
sudo ufw default deny incoming (internet) =] (computer)
Caution:

Add Rules
By port
By name

TCp/UDP
sudo ufw allow 80/tcp
sudo ufw allow http/tcp
sudo ufw allow 1725/udp

Advanced Rules
Ip address:
sudo ufw allow from 192.168.1.4
specific subnet
sudo ufw allow from 192.168.1.4/24
allow specific ip and port combination:
sudo ufw allow from 192.168.1.4 to any port 22 proto tcp
Remove Rules
sudo ufw delete allow 80

Edit UFW's Configuration Files
Before rules:
/etc/ufw/before.rules
/etc/ufw/before6.rules
After rules:
/etc/ufw/after.rules
/etc/ufw/after6.rules
Other:
/etc/default/ufw
UFW Status

Enable the Firewall
sudo ufw enable
sudo ufw disable
Logging
sudo ufw loggin on
view log:
/var/log/ufw

Some important info:
IN:
OUT:
MAC:
SRC:
DST:
LEN:
TTL:
PROTO:
SPT:
DPT:
WINDOW:
SYN URGP:

___________

I like to study together. If you think like me please contact as below. Thanks for your watching.

Contact info:
email: [email protected]
www: mydeveloper.info