Firewalld: Difference between revisions

From Freephile Wiki
Created page with "http://www.firewalld.org/documentation/firewalld-structure+nftables.png [http://www.firewalld.org/ Firewalld] is the default firewall management tool on the RHEL and Fedora d..."
 
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight"
 
Line 6: Line 6:


To get status, just  
To get status, just  
<source lang="bash">
<syntaxhighlight lang="bash">
systemctl status firewalld
systemctl status firewalld
# or  
# or  
Line 15: Line 15:
sudo firewall-cmd --list-ports [zone]
sudo firewall-cmd --list-ports [zone]
80/tcp 443/tcp 1936/tcp
80/tcp 443/tcp 1936/tcp
</source>
</syntaxhighlight>


Then to add a port
Then to add a port
<source lang="bash">
<syntaxhighlight lang="bash">
firewall-cmd --add-port=9201/tcp
firewall-cmd --add-port=9201/tcp
# test to see if it works
# test to see if it works
firewall-cmd --permanent --add-port=9201/tcp
firewall-cmd --permanent --add-port=9201/tcp
</source>
</syntaxhighlight>


[[Category:Firewall]]
[[Category:Firewall]]
[[Category:Meza]]
[[Category:Meza]]

Latest revision as of 13:26, 24 February 2025

firewalld-structure+nftables.png

Firewalld is the default firewall management tool on the RHEL and Fedora distributions.

Firewalld is integrated into Meza

To get status, just

systemctl status firewalld
# or 
sudo firewall-cmd --state
sudo firewall-cmd --list-all-zones
sudo firewall-cmd --get-default-zone
sudo firewall-cmd --get-active-zones
sudo firewall-cmd --list-ports [zone]
80/tcp 443/tcp 1936/tcp

Then to add a port

firewall-cmd --add-port=9201/tcp
# test to see if it works
firewall-cmd --permanent --add-port=9201/tcp