Update cheatsheets

This commit is contained in:
ivuorinen
2025-11-10 00:21:37 +00:00
parent 15848b0938
commit 9420175cb8
27 changed files with 159 additions and 74 deletions

View File

@@ -11,32 +11,32 @@ source: https://github.com/tldr-pages/tldr.git
- Enable `ufw`:
`ufw enable`
`sudo ufw enable`
- Disable `ufw`:
`ufw disable`
`sudo ufw disable`
- Show `ufw` rules, along with their numbers:
`ufw status numbered`
`sudo ufw status numbered`
- Allow incoming traffic on port 5432 on this host with a comment identifying the service:
`ufw allow 5432 comment "{{Service}}"`
`sudo ufw allow 5432 comment "{{Service}}"`
- Allow only TCP traffic from 192.168.0.4 to any address on this host, on port 22:
`ufw allow proto tcp from 192.168.0.4 to any port 22`
`sudo ufw allow proto tcp from 192.168.0.4 to any port 22`
- Deny traffic on port 80 on this host:
`ufw deny 80`
`sudo ufw deny 80`
- Deny all UDP traffic to ports in range 8412:8500:
`ufw deny proto udp from any to any port 8412:8500`
`sudo ufw deny proto udp from any to any port 8412:8500`
- Delete a particular rule. The rule number can be retrieved from the `ufw status numbered` command:
`ufw delete {{rule_number}}`
`sudo ufw delete {{rule_number}}`