ufw
Uncomplicated Firewall. tldr-pages
On Linux 1 Sigma rule name it
Linux
Uncomplicated Firewall. Frontend for iptables aiming to make configuration of a firewall easier. Some subcommands such as allow, enable, delete, etc. have their own usage documentation.
Enable/Disable ufw
sudo ufw enableIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Show ufw rules, along with their numbers
sudo ufw status numberedIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Allow incoming traffic on port 5432 on this host with a comment identifying the service
sudo ufw allow 5432 comment "Service"IdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Allow only TCP traffic from 192.168.0.4 to any address on this host, on port 22
sudo ufw allow proto tcp from 192.168.0.4 to any port 22IdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Allow traffic from any IP on the 192.168.0/24 subnet on this host, through port 53, only on the eth0 interface
sudo ufw allow in on eth0 from 192.168.0.0/24 to any port 53IdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Deny traffic on port 80 on this host
sudo ufw deny 80IdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Deny all UDP traffic to ports in range 8412:8500
sudo ufw deny proto udp from any to any port 8412:8500IdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Delete a particular rule. The rule number can be retrieved from the ufw status numbered command
sudo ufw delete rule_numberIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community