Dec 15

Experiment with Firewalls in Linux (CentOS/RedHat)

44 firewall-cmd --state
45 systemctl status firewalld
46 firewall-cmd --reload
47 systemctl restart firewalld.service

systemctl restart firewalld

48 firewall-cmd --get-default-zone
49 firewall-cmd --get-active-zones
50 firewall-cmd --get-zones
51 firewall-cmd --get-zone-of-interface=ens33
52 firewall-cmd --list-all
53 firewall-cmd --list-all-zones
54 firewall-cmd --get-default-zone
55 firewall-cmd --get-active-zones
56 firewall-cmd --list-all
57 firewall-cmd --get-zones
58 firewall-cmd --list-all-zones
59 firewall-cmd --list-all --zone external
60 firewall-cmd --new-zone testzone --perm
61 firewall-cmd --delete-zone testzone --perm
62 firewall-cmd --get-zones
63 firewall-cmd --new-zone testzone --perm
64 firewall-cmd --get-zones
65 cat /etc/firewalld/zones/testzone.xml
66 cat /etc/firewalld/zones/
67 ll /etc/firewalld/zones/
68 cat /etc/firewalld/firewalld.conf
69 firewall-cmd --get-services
70 firewall-cmd --list-services
71 firewall-cmd --list-services --zone internal
72 firewall-cmd --query-service tftp
73 firewall-cmd --query-service ftp

76 firewall-cmd --query-service ssh
77 firewall-cmd --new-service testservice --perm
78 ll /etc/firewalld/services/testservice.xml
79 firewall-cmd --add-service testservice testservice --zone work --perm
80 firewall-cmd --permanent --add-service testservice --zone work
81 firewall-cmd --list-services --zone work
82 firewall-cmd --list-ports
83 firewall-cmd --query-port 53/tcp --zone dmz
84 firewall-cmd --permanent --add-port 53/tcp
85 firewall-cmd --list-ports
86 firewall-cmd --query-port 53/tcp --zone dmz
87 firewall-cmd --query-port 53/tcp

Skip to toolbar