Select Page

Firewalld Tutorial – Securing your Centos server with Linux Firewall
December 21, 2017
Firewalld Tutorial – Securing your Centos server with Linux Firewall

Firewalld provides a dynamically managed firewall with support for network/firewall zones that define the trust level of network connections or interfaces. In this tutorial, we will cover how to set up a firewall for your centos server and show you the basics of managing the firewall.

Step 1 - Install and Enable Firewalld to Start at Boot

Login as root user and run the following command

yum install firewalld
systemctl enable firewalld

Allowing or denying an arbitrary port

firewall-cmd --zone=public --add-port=12345/tcp --permanent
firewall-cmd --zone=public --remove-port=12345/tcp --permanent

Reload firewalld so the rules take effect immediately

firewall-cmd --reload

List all current rules

firewall-cmd --zone=public --list-all

By Jackie Sung

Jackie Sung, also known by his nick-name KK, always strives for the best and learn from the best. Working and living as a Freelance Web Engineer/ Web Developer & Designer/ Amateur Youtuber/ Husky Lover.

Related Articles

How To Install and Configure Proxmox VE on Hetzner Server

How To Install and Configure Proxmox VE on Hetzner Server

Proxmox VE is a complete open-source platform for enterprise virtualization. With the built-in web interface you can easily manage VMs and containers, software-defined storage and networking, high-availability clustering, and multiple out-of-the-box tools on a single solution.

read more

0 Comments

Submit a Comment

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

Pin It on Pinterest

Share This