ufw: Improve page

waldyrious/alt-syntax
Agniva De Sarker 2016-08-28 15:21:54 +05:30
parent 72ce264ee7
commit 7506047a39
1 changed files with 16 additions and 8 deletions

View File

@ -11,18 +11,26 @@
`ufw disable` `ufw disable`
- Show ufw rules: - Show ufw rules, along with their numbers:
`ufw status` `ufw status numbered`
- Add ufw allow rule: - Allow incoming traffic on port 5432 on this host:
`ufw allow {{port}} {{service_name}}` `ufw allow {{5432}}`
- Example: Allow access to port 1337 from IP 1.2.3.4 using udp: - Allow only TCP traffic from 192.168.0.4 to any address on this host, on port 22:
`ufw allow from 1.2.3.4 to any port 1337 proto udp` `ufw allow from {{192.168.0.4}} to {{any}} port {{22}} proto {{tcp}}`
- Add ufw deny rule: - Deny traffic on port 80 on this host:
`ufw deny {{port}} {{service_name}}` `ufw deny {{80}}`
- Deny all UDP traffic to port 22:
`ufw deny from {{any}} to {{any}} port {{22}} proto {{udp}}`
- Remove a particular rule. The rule number can be retrieved from the `ufw status numbered` command:
`ufw delete {{rule_number}}`