Personal Device Security - Firewall Configuration

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)

macOS Security and Privacy settings pane selected on the Firewall settings section.

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

macOS Security & Privacy firewall settings enabled.

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.

Windows Settings Security window.

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

Windows Firewall & network protection window.

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

Windows Security preferences with the Microsoft Defender Firewall option highlighted.

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

  1. Open a terminal on the Linux system.
  2. Install the Uncomplicated Firewall package using sudo apt install ufw.
  3. Enable the firewall with the command sudo ufw enable.
  4. Check the firewall status using sudo ufw status.

 

Red Hat/Rocky Linux

  1. Open a terminal on the Linux system.
  2. Install the firewalld package using sudo dnf install firewalld.
  3. Enable and start firewalld with sudo systemctl enable --now firewalld.
  4. Check the firewall status using sudo firewall-cmd --state.

[Back to Top]

Print Article

Related Services / Offerings (1)

Recommendations for securing your personally owned device on the University's network.