Friday, 8 October 2021

Basic Firewalld configuration for Linux server

1. Show all zone name and information about those zone.

 firewall-cmd --list-all-zones  

2. Create new zone.

 firewall-cmd --new-zone=dmz2 --permanent
3. Add source network or source IP to firewall zone to allow those network access allow services or port number in specific zone.
 firewall-cmd --zone=dmz2 --add-source=192.168.0.0/24 --permanent  
 firewall-cmd --reload  #Apply

4. Add service port to allow sources network in a zone to access those port.

 firewall-cmd --zone=dmz2 --add-port=80/tcp --add-port=443 --permanent  
 firewall-cmd --reload  #apply

No comments:

Post a Comment

Import SSH Private Key to Yubikey (PIV) for SSH Authentication

Introduction: This guide will walk you through the process of importing your SSH private key to a Yubikey (PIV) for SSH authentication on y...