How can we help you today?

Basic Management Of Firewalld On Linux

Introduction

This is a quick overview of some very basic firewalld related commands that can be run on Linux. With firewalld there is no need to remove iptables as it should be run along side it. All firewalld will do is provide us a much simpler command structure, ultimately anything applied in firewalld gets placed into iptables.

Installing Firewalld & Enabling Autostart

On more modern distros firewalld can be installed using the following command:

yum install firewalld

If it’s already installed just ensure it’s started using the commands in the next section.

To ensure it autostart on boot:

systemctl enable firewalld.service

Starting, Stopping & Reloading Firewalld

Starting firewalld:

systemctl start firewalld.service

Stopping firewalld:

systemctl stop firewalld.service

Reloading firewalld:

systemctl reload firewalld.service

Allowing Ports Through Firewalld

Allow a single port:

firewall-cmd --permanent --add-port=80/tcp

Allow a port range:

firewall-cmd --permanent --add-port=60000-61000/tcp

Activate Recently Applied Rules

Recently applied rules can be activated bt reloading the firewalld ruleset with the following command:

firewall-cmd --reload

Leave a Reply

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

    ICTU LTD is a company registered England and Wales (Company No. 09344913) 142 Thornes Lane, Wakefield, England, WF2 7RE
    Copyright © 2025 ICTU LTD, All Rights Reserved.