Firewalld | https://www.youtube.com/watch?v=T2g6nxRCnLQ&ab_channel=NetSecProf | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
firewall-cmd --list-all (default zone= public ) | |||||||||||
Start and stop deamon | |||||||||||
[root@sn9120210070 ~]# firewall-cmd --state sudo systemctl stop status firewalld.service sudo systemctl start firewalld.service | |||||||||||
disable the firewalld | sudo systemctl stop firewalld.service | ||||||||||
Services | |||||||||||
list all services available | firewall-cmd --get-services | ||||||||||
add service to a zone | firewall-cmd --add-service=https ( will add to the default zone= public or "untrusted" or what ever default zone)
| ||||||||||
list all ICMP type |
| ||||||||||
allow ICMP |
| ||||||||||
traceroute |
| ||||||||||
add permanent service | firewall-cmd --add-service-https --permanent | ||||||||||
create service | |||||||||||
Ports | |||||||||||
add port | firewall-cmd --get-ports | ||||||||||
add permanent port | |||||||||||
host or IP address or subnet | |||||||||||
sudo firewall-cmd --permanent --add-source=192.168.2.50 sudo firewall-cmd --permanent --add-source=192.168.2.0/24 | |||||||||||
on the conductor | |||||||||||
Zones | |||||||||||
list zones | firewall-cmd --get-zones | ||||||||||
zones config info | firewall-cmd --zone=home --list-all | ||||||||||
add zones | |||||||||||
create zone | |||||||||||
NAT or masquarade | |||||||||||
...