Compare commits

...

2 Commits

Author SHA1 Message Date
sysadt
ab3d3af4e4 Merge db889584d3 into fe62dc3a11 2023-11-08 22:56:48 +01:00
sysadt
db889584d3 UFW automatic blacklist rules 2023-11-08 22:55:14 +01:00

View File

@@ -1651,6 +1651,36 @@ Then you can enable it like any other app:
sudo ufw allow plexmediaserver
```
#### Automatic IP-Blacklisting
The [IPSum](https://github.com/stamparm/ipsum) project is hosting a blacklist of known malicious IP addresses which gets updated daily. You can automatically import these with UFW and [these scripts](https://github.com/sysadt/UFW-Automatic-IP-Blacklisting).
Create a directory for your blacklist and the scripts:
```
mkdir /opt/ip-blacklist
```
Download the scripts to the created directory:
```
wget https://raw.githubusercontent.com/sysadt/UFW-Automatic-IP-Blacklisting/main/ip-blacklist.sh -P /opt/ip-blacklist
wget https://raw.githubusercontent.com/sysadt/UFW-Automatic-IP-Blacklisting/main/update-blacklist.sh -P /opt/ip-blacklist
```
Change permissions:
```
chmod 700 /opt/ip-blacklist/ip-blacklist.sh
chmod 700 /opt/ip-blacklist/update-blacklist.sh
```
Add the scripts to a daily cronjob:
```
crontab -e
```
```
0 6 * * * /opt/ip-blacklist/update-blacklist.sh
10 6 * * * /opt/ip-blacklist/ip-blacklist.sh
```
([Table of Contents](#table-of-contents))
### iptables Intrusion Detection And Prevention with PSAD