Difference between revisions of "SELinux,Fail2ban,Security Configurations"
Jump to navigation
Jump to search
| Line 30: | Line 30: | ||
sudo yum -y install epel-release | sudo yum -y install epel-release | ||
sudo yum -y install fail2ban | sudo yum -y install fail2ban | ||
| − | sudo systemctl enable fail2ban | + | sudo systemctl enable fail2ban && sudo systemctl start fail2ban |
| + | nano /etc/fail2ban/jail.conf | ||
[DEFAULT] | [DEFAULT] | ||
# Ban hosts for one hour: | # Ban hosts for one hour: | ||
| Line 40: | Line 41: | ||
# Override /etc/fail2ban/jail.d/00-firewalld.conf: | # Override /etc/fail2ban/jail.d/00-firewalld.conf: | ||
banaction = iptables-multiport | banaction = iptables-multiport | ||
| − | ignoreip = 127.0.0.1/8 154.160.2.127/ | + | ignoreip = 127.0.0.1/8 154.160.2.127/16 |
[sshd] | [sshd] | ||
| Line 55: | Line 56: | ||
sudo fail2ban-client status wordpress3 | sudo fail2ban-client status wordpress3 | ||
sudo fail2ban-client status http-get-post-dos | sudo fail2ban-client status http-get-post-dos | ||
| + | |||
== Install Letsencrypt == | == Install Letsencrypt == | ||
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm | dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm | ||