Basic use of Linux firewall

1. Basic use of firewalld

Start: systemctl start firewalld

Shut down: systemctl stop firewalld

View status: systemctl status firewalld

Boot disabled: systemctl disable firewalld

Enable at boot: systemctl enable firewalld

2. View firewall status: firewall-cmd --get-default-zone

3. View the public status list of the firewall: firewall-cmd --zone=public --list-all

4. Dynamically set the firewall and add http to the public firewall (this method will still fail next time you restart): firewall-cmd --zone=public --add-service=http

Statically set the firewall (permanent way): firewall-cmd --zone=public --add-serice=http --permanent

Guess you like

Origin blog.csdn.net/anluo233/article/details/127282859