Secure Your Online Activity With Ufw: Blocking Incoming Connections On All Ports

UFW
security
WiFi
blocking
incoming connections
ports
configuration
This article explains how to use UFW (Uncomplicated Firewall) to block incoming connections on all ports for increased security, especially when accessing public WiFi networks. The article provides instructions on how to configure and test the effectiveness of UFW using another computer.
Published

June 9, 2024


UFW access control

when using long range public wifi it matters to block every port from incoming connections.

sudo ufw default deny
sudo ufw prepend reject in on <intetfece name>
sudo ufw restart

when configuration is done, remember to restart ufw and reconnect existing interfaces.

although remote clients are blocked, self-issued connections are not. so be sure to use another computer for testing ufw effectiveness before and after configuration.