By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
IT Infras HolicIT Infras HolicIT Infras Holic
  • News
  • Linux
    • Application
    • SELinux
    • Centos
    • Ubuntu
  • Docker
  • Web Server
    • Kong
    • Nginx
    • Openlitespeed
  • Database
  • Mikrotik
  • Windows
  • Mail
  • Tools
    • 2048
    • Fantasy Forest
    • Hextris
    • Crossword
Search
  • Privacy Policy
© 2024. All Rights Reserved.
Font ResizerAa
IT Infras HolicIT Infras Holic
Font ResizerAa
  • News
  • Linux
  • Docker
  • Web Server
  • Database
  • Mikrotik
  • Windows
  • Mail
  • Tools
Search
  • News
  • Linux
    • Application
    • SELinux
    • Centos
    • Ubuntu
  • Docker
  • Web Server
    • Kong
    • Nginx
    • Openlitespeed
  • Database
  • Mikrotik
  • Windows
  • Mail
  • Tools
    • 2048
    • Fantasy Forest
    • Hextris
    • Crossword
Follow US
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
IT Infras Holic > Blog > Linux > Firewalld Cheat Sheet
Linux

Firewalld Cheat Sheet

writer
Share
1 Min Read
SHARE

Firewalld Cheat Sheet

Configuration File

1
vi /etc/firewalld/firewalld.conf

 

Contents
Firewalld Cheat SheetConfiguration FileAdd http/https servicesList ServicesAdd PortList PortsList All ZonesGet Active Zones (Firewalld Cheat Sheet)Set Default ZoneForward portAdd Interface to ZoneRemove Interface  from Zone

Add http/https services

1
2
sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --zone=public --permanent --add-service=https

 

List Services

1
sudo firewall-cmd --zone=public --list-services

 

Add Port

1
2
sudo firewall-cmd --zone=public --permanent --add-port=5000/tcp
sudo firewall-cmd --zone=public --permanent --add-port=4990-4999/udp

List Ports

1
sudo firewall-cmd --zone=public --list-ports

 

List All Zones

1
firewall-cmd --list-all-zones

 

Get Active Zones (Firewalld Cheat Sheet)

1
sudo firewall-cmd --get-active-zones

Set Default Zone

1
firewall-cmd --permanent --zone=public --set-target=default

Forward port

1
2
3
4
5
firewall-cmd --zone=public --add-masquerade
 
firewall-cmd
  --zone=public
  --add-forward-port=port=8443:proto=tcp:toport=8443:toaddr=10.11.10.163

 

Add Interface to Zone

1
firewall-cmd --permanent --zone=internal --add-interface=ens34

 

Remove Interface  from Zone

1
firewal-cmd --permanent --zone=public --remove-interface=ens34

You Might Also Like

Monitoring File & Directory Changes using Bash Script

Vulnerability Checker CVE-2024-3094

Unleashing the Potential of Knowledge Management with Wiki.js

How to Install Apache Guacamole with Docker Compose

Unlocking Seamless Remote Access: Exploring the Power of Apache Guacamole

TAGGED: cheat sheet, firewall, firewalld
Share This Article
Facebook Twitter Whatsapp Whatsapp LinkedIn Telegram Copy Link
Previous Article configure firewalld Configure FirewallD for Mail Server in Centos 7
Next Article vim cheat sheet Vim Cheat Sheet
Leave a comment

Leave a Reply Cancel reply

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

Latest News

bash
Monitoring File & Directory Changes using Bash Script
Linux Application
vulnerability
Vulnerability Checker CVE-2024-3094
Linux
wiki.js
Unleashing the Potential of Knowledge Management with Wiki.js
Application Linux
Install Apache Guacamole
How to Install Apache Guacamole with Docker Compose
Application Linux

You Might also Like

How to Install Cyberpanel on Ubuntu 22.04
OpenlitespeedUbuntuWeb Server

Install Cyberpanel on Ubuntu 22.04

8 Min Read
How to map SFTP as a drive on Windows 10
LinuxWindows

How to map SFTP as a drive on Windows 10

3 Min Read
Follow US
© 2024
activity notes activity notes
Welcome Back!

Sign in to your account

Lost your password?