Update README.md
This commit is contained in:
parent
4238342785
commit
b854e9d661
11
README.md
11
README.md
@ -1,3 +1,12 @@
|
|||||||
# barbara
|
# barbara
|
||||||
|
|
||||||
Reads logs and, if the traffic doesn't pass muster, updates the pf table <barbara> to block it.
|
Reads logs and, if the traffic doesn't pass muster, updates the pf table <barbara> to block it.
|
||||||
|
|
||||||
|
Barbara is the name of our Romainian White Border Collie. She doesn't trust you on your first meeting, it can months or even years before she feels secure enough to let you stroke her and even then she might try and bite you. She errs on the side of caution as does this Python3 script.
|
||||||
|
|
||||||
|
## How it works
|
||||||
|
The idea is to block traffic before it gets to your servers. PF-Badhost does a good job at keeping baddies out, but is always a few hours out-of-date and it doesn't stop everything. What can get through appears in the logs - in my case, the relayd logs, before being redirected to the actual web servers.
|
||||||
|
|
||||||
|
The Python script reads each log entry and gets the domain name of the site request and looks to see if the request is trying to retrieve file types that are allowed for that website - if it is, the request passes; otherwise it is blocked.
|
||||||
|
|
||||||
|
So, for example, if you use a static site using only html and css and a php page is requested, that IP address will be blocked. Same for cgi-bin etc.
|
||||||
Loading…
x
Reference in New Issue
Block a user