Difference between revisions of "The Red Hat firewall"

From MyWiki
Jump to: navigation, search
Line 12: Line 12:
 
  firewall-cmd --reload
 
  firewall-cmd --reload
 
  firewall-cmd --zone=trusted --list-sources
 
  firewall-cmd --zone=trusted --list-sources
 +
Note: Add the –permanent option if you only want to display permanent settings.

Revision as of 10:54, 12 May 2016

less /etc/sysconfig/system-config-firewall
The configuration for firewalld is stored in various XML files in /usr/lib/firewalld/ and /etc/firewalld/. This allows a great deal of flexibility as the files can be edited, written to, backed up, used as templates for other installations and so on.
systemctl status firewalld

iptables-save
service firewalld stop
service firewalld start
systemctl disable firewalld
systemctl enable firewalld
firewall-cmd

Reference - https://www.certdepot.net/rhel7-get-started-firewalld/

firewall-cmd --permanent --zone=trusted --add-source=192.168.2.0/24
firewall-cmd --reload
firewall-cmd --zone=trusted --list-sources

Note: Add the –permanent option if you only want to display permanent settings.