Block an IP Address (UFW) - Debian/Linux

Започео admin, Мај 2021 17:50:06

« претходна тема - следећа тема »

admin

"Block an IP Address" after "# End required lines" section.
$ sudo vi /etc/ufw/before.rules

Find line that read as follows:

# End required lines
Append your rule to block spammers or hackers:

# Block spammers
-A ufw-before-input -s 178.137.80.191 -j DROP

# Block ip/net (subnet)
-A ufw-before-input -s 202.54.1.0/24 -j DROP

Save and close the file. Finally, reload the firewall:
$ sudo ufw reload