Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
systems:firewalld [2019/08/24 10:42]
eServices Greece created
systems:firewalld [2020/04/13 06:41] (current)
eServices Greece
Line 1: Line 1:
 {{tag>centos kernel}} {{tag>centos kernel}}
 ====== Firewalld ====== ====== Firewalld ======
 +
 +===== Generic (Permanent) Port =====
 +<sxh bash>firewall-cmd --zone=public --add-port=80/tcp --permanent
 +firewall-cmd --reload</sxh>
  
 ===== SNMPD ===== ===== SNMPD =====
-==== Create Profile ====+=== Create Profile ===
 <sxh bash> <sxh bash>
 vim /etc/firewalld/services/snmp.xml vim /etc/firewalld/services/snmp.xml
Line 17: Line 21:
 </sxh> </sxh>
  
-==== Add Rule ==== +=== Add Rule === 
-<sxh>firewall-cmd --reload+<sxh bash>firewall-cmd --reload
 firewall-cmd --zone=public --add-service snmp --permanent firewall-cmd --zone=public --add-service snmp --permanent
 firewall-cmd --reload</sxh> firewall-cmd --reload</sxh>
  
 +
 +===== Cockpit =====
 +<sxh bash>firewall-cmd --add-service=cockpit
 +firewall-cmd --add-service=cockpit --permanent</sxh>
 +
 +===== Allow traffic through bridge =====
 +<sxh>firewall-cmd --permanent --direct --passthrough ipv4 -I FORWARD -i vbr0 -j ACCEPT
 +firewall-cmd --permanent --direct --passthrough ipv4 -I FORWARD -o vbr0 -j ACCEPT
 +firewall-cmd --reload</sxh>
 +
 +===== http/s =====
 +=== By Service name ===
 +<sxh>firewall-cmd --zone=public --permanent --add-service=http
 +firewall-cmd --zone=public --permanent --add-service=https
 +firewall-cmd --reload</sxh>
 +
 +=== By Port ===
 +<sxh>
 +firewall-cmd --permanent --add-port=80/tcp
 +firewall-cmd --permanent --add-port=443/tcp
 +firewall-cmd --reload</sxh>