The door to safety swings on the hinges of common sense
A firewall is a program that acts as a protective barrier, a gatekeeper or a security guard between you and the Internet. In other words, it prevents unauthorized Internet traffic from entering or leaving your computer, both by software programs and users.
The best free firewalls are:
To turn on the Firewall: System Preferences, Security & Privacy, Firewall. Click Turn On Firewall, then click Firewall Options to fine-tune the firewall settings, Enable Automatically allow built-in/downloaded signed software to receive incoming connections (it adds stock apps -iTunes, Mail, Messages- and downloaded apps that are signed by a valid certificate authority to be automatically added to the list of allowed apps) and stealth mode (it prevents your macOS from responding to probing requests or queries to reveal its existence from the network).
Firewalld is a firewall that uses nftables by default. This brief tutorial shows you how to install and configure it in Arch, GNU/Linux.
# Install necessary packages
sudo pacman -S firewalld ipset ebtables
# Enable and start firewalld.service.
sudo systemctl enable --now firewalld.service
# Change the default zone to home.
sudo firewall-cmd --set-default-zone=home
# Open ftp, htpp, samba, and synchthing services: --permanent because changes made in Runtime configuration are lost when the firewalld service is restarted.
sudo firewall-cmd --add-service=ftp --permanent
sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --add-service=samba --permanent
sudo firewall-cmd --zone=home --add-service=syncthing --permanent
# Allow traffic on an incoming port (24800) -Barrier-
sudo firewall-cmd --add-port=24800/tcp --permanent
# Restart the firewall.
sudo firewall-cmd --reload
# List allowed service and ports on the system
❯ sudo firewall-cmd --list-service
dhcpv6-client fttp http mdns samba samba-client ssh syncthing
Ufw stands for the uncomplicated firewall