mirror of
https://github.com/imthenachoman/How-To-Secure-A-Linux-Server.git
synced 2025-12-06 09:12:47 +01:00
Merge fbd72e25ca into fe62dc3a11
This commit is contained in:
30
README.md
30
README.md
@@ -1651,6 +1651,36 @@ Then you can enable it like any other app:
|
|||||||
sudo ufw allow plexmediaserver
|
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:
|
||||||
|
```
|
||||||
|
sudo crontab -e
|
||||||
|
```
|
||||||
|
```
|
||||||
|
0 6 * * * /opt/ip-blacklist/update-blacklist.sh
|
||||||
|
10 6 * * * /opt/ip-blacklist/ip-blacklist.sh
|
||||||
|
```
|
||||||
|
|
||||||
([Table of Contents](#table-of-contents))
|
([Table of Contents](#table-of-contents))
|
||||||
|
|
||||||
### iptables Intrusion Detection And Prevention with PSAD
|
### iptables Intrusion Detection And Prevention with PSAD
|
||||||
|
|||||||
Reference in New Issue
Block a user