Get the App
SLTechnology News&Howtos  ›  Network Security  › 

How does Linux use firewalls to block hacker attacks?

Shulou Source: shulou.com Published: 2022-06-01 08:21:27 10月05日 Update

1) hackers use brute force cracking tools to remotely attack Linux servers through users

Name and password dictionary, attempt to log in to the Linux server operating system, as an operator

How can members stop hacker attacks?

2) remote login to the Linux server, and the Linux server opens the security log file:

/ var/log/secure records the login status of normal users or hackers, and analyzes the

File to find out the hacker's IP, and log in more than 10 times, add it to the Linux

Blacklist in Iptables Firewall

For i in $(grep "Failed password" / var/log/secure* | grep-oE

"([0-9] {1Magne 3}.) {3} [0-9] {1pr 3}" | sort-n | uniq-c | awk

'{if (($1 > = 10)) print $2}' | grep-v ^ 127); do iptables-I INPUT

4-s $I-j DROP;done

Tags: Servers services logins hackers attacks files users firewalls fire protection security operating systems personnel dictionaries passwords tools logs violence times status user names Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft NVidia Apple vpn OPPO Reno