README: example
This commit is contained in:
parent
6799cb9846
commit
77e26ef721
1 changed files with 11 additions and 0 deletions
11
README.md
11
README.md
|
|
@ -45,3 +45,14 @@ Then simply add additional commands as needed.
|
|||
tr '[]' ' ' |
|
||||
awk '{print $2}' >> autofw.badips
|
||||
|
||||
The output is a list of UFW commands.
|
||||
Here we assume we have blocked a.b.c.115 and a.b.c.116, and whitelisted e.f.g.h.
|
||||
The reason we first delete the rule for e.f.g.h and then add it back, is to make sure it comes first.
|
||||
This way whitelisted addresses can never be blocked.
|
||||
|
||||
yes | ufw delete deny from a.b.c.115/32
|
||||
yes | ufw delete deny from a.b.c.116/32
|
||||
ufw insert 1 deny from a.b.c.112/29
|
||||
yes | ufw delete allow from e.f.g.h/32
|
||||
yes | ufw insert 1 allow from e.f.g.h/32
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue