Overview
A system firewall serves as a critical layer of defense, monitoring network traffic and allowing only trusted communication to reach your device. By filtering incoming connections, the firewall reduces exposure to malicious activity and limits the risk of unauthorized access, especially when connecting to unfamiliar or public networks. This article will provide instructions for enabling the firewall for each operating system.
In this article:
macOS Instructions
1. On your Mac, choose Apple menu > System Preferences, click Security & Privacy, then click Firewall. (Please note: on macOS Ventura or greater the path is Apple menu > System Settings, click Security & Privacy, then click Firewall)

2. Click the lock in the bottom left to make changes.

3. Click Turn On Firewall.
[Back to Top]
Windows Instructions
The Microsoft Defender Firewall is enabled by default. Turning off Microsoft Defender Firewall could make your device more vulnerable to unauthorized access.
1. Select the Start button > Settings > Update & Security > Windows Security and then Firewall & network protection.

2. Select a network profile: Domain network, Private network, or Public network.

3. Under Microsoft Defender Firewall, switch the setting to On.

If there's an app you need to use that's being blocked, you can allow it through the firewall, instead of turning the firewall off.
[Back to Top]
Linux Instructions
Different Linux distributions may use different programs to handle firewall configuration. For example, Ubuntu uses UFW (Uncomplicated FireWall), while Red Hat uses Firewalld. Options are available for enabling the firewall using the System Settings Graphical User Interface (GUI) program as well as through a Command Line Interface (CLI) tool. Instructions for enabling the firewall through the CLI is as follows:
Ubuntu/Debian
- Open a terminal on the Linux system.
- Install the Uncomplicated Firewall package using
sudo apt install ufw.
- Enable the firewall with the command
sudo ufw enable.
- Check the firewall status using
sudo ufw status.
Red Hat/Rocky Linux
- Open a terminal on the Linux system.
- Install the firewalld package using
sudo dnf install firewalld.
- Enable and start firewalld with
sudo systemctl enable --now firewalld.
- Check the firewall status using
sudo firewall-cmd --state.
[Back to Top]