Firewalld: Difference between revisions
Jump to navigation
Jump to search
(4 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
=open port in default zone= | =open port in default zone= | ||
firewall-cmd --add-port=8080/tcp | firewall-cmd --add-port=8080/tcp | ||
=open port 8081/tcp in public zone= | |||
firewall-cmd --zone=public --add-port=8081/tcp | |||
=open service ipp in public zone= | |||
firewall-cmd --zone=public --add-service=ipp | |||
=get active zones= | =get active zones= | ||
firewall-cmd --get-active-zones | firewall-cmd --get-active-zones | ||
FedoraWorkstation | FedoraWorkstation | ||
interfaces: enp1s0 | interfaces: enp1s0 | ||
=list zone configuration= | =list current zone configiguration= | ||
firewall-cmd --list-all | |||
=list specific zone configuration= | |||
firewall-cmd --zone=public --list-all | |||
public | public | ||
target: default | target: default | ||
Line 27: | Line 34: | ||
icmp-blocks: | icmp-blocks: | ||
rich rules: | rich rules: | ||
=move interface enp1s0 to trusted zone= | =move interface enp1s0 to trusted zone= | ||
firewall-cmd --zone=trusted --change-interface enp1s0 | |||
=list available services= | =list available services= | ||
firewall-cmd --get-services | firewall-cmd --get-services | ||
=list available zones= | =list available zones= | ||
firewall-cmd --get-zones | firewall-cmd --get-zones |
Latest revision as of 12:22, 9 March 2020
start firewalld
systemctl start firewalld
look at state of firewalld
firewall-cmd --state
Which is the default zone
sudo firewall-cmd --get-default-zone FedoraWorkstation
open port in default zone
firewall-cmd --add-port=8080/tcp
open port 8081/tcp in public zone
firewall-cmd --zone=public --add-port=8081/tcp
open service ipp in public zone
firewall-cmd --zone=public --add-service=ipp
get active zones
firewall-cmd --get-active-zones FedoraWorkstation interfaces: enp1s0
list current zone configiguration
firewall-cmd --list-all
list specific zone configuration
firewall-cmd --zone=public --list-all public target: default icmp-block-inversion: no interfaces: sources: services: dhcpv6-client mdns ssh ports: protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules:
move interface enp1s0 to trusted zone
firewall-cmd --zone=trusted --change-interface enp1s0
list available services
firewall-cmd --get-services
list available zones
firewall-cmd --get-zones