updated notes
This commit is contained in:
@@ -743,8 +743,22 @@ sudo dnf repolist # List all repositories
|
||||
## Understand and Configure Firewalls
|
||||
|
||||
### firewall-cmd
|
||||
> Note: firewall-cmd is used to manage the firewall rules.
|
||||
```bash
|
||||
sudo firewall-cmd --get-active-zones # Display the active zones
|
||||
sudo firewall-cmd --get-default-zone # Display the default zone
|
||||
sudo firewall-cmd --get-zones # Display the zones
|
||||
|
||||
sudo firewall-cmd --list-all # Display all the rules in the firewall
|
||||
|
||||
sudo firewall-cmd --zone=public --add-service=http --permanent # Add the http service to the public zone
|
||||
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent # Add the port 80/tcp to the public zone
|
||||
sudo firewall-cmd --zone=public --add-protocol=tcp --permanent # Add the tcp protocol to the public zone
|
||||
|
||||
sudo firewall-cmd --reload # Reload the firewall
|
||||
```
|
||||
|
||||
### port reference
|
||||
```bash
|
||||
sudo less /etc/services # Display the services
|
||||
```
|
||||
Reference in New Issue
Block a user