How to Install Firewalld on WSL Ubuntu

This post contains installation notes for installing firewalld on Ubuntu Linux running within Windows Subsystem for Linux (WSL).

What is Firewalld?

Firewalld is a tool that helps users to manage the firewall on their Linux machine. With firewalld, users can define rules to allow or block specific types of network traffic, such as incoming connections to certain services or outgoing connections to specific destinations.

Check out firewalld.org for more information.

Installing Firewalld on WSL Ubuntu

By running the commands below we update our local packages and install firewalld on Ubuntu:

# update local packages for install ubuntu
sudo apt update

# install firewalld on ubuntu
sudo apt -y install firewalld
WSL Ubuntu Install Firewalld

To verify firewalld is installed, we can run a few example commands.

First, we’ll check the installed firewalld version by running sudo firewall-cmd --version:

Check firewalld version

Next, lets check the firewalld help menu for the command list by running sudo firewall-cmd --list-all:

Firewalld Help Command List

That’s it for this one, hope this quick guide for what you needed.

Leave a Reply

Your email address will not be published. Required fields are marked *