Linux/CentOS 7

From Omnia
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Firewall [1]

firewall-cmd --add-port=80/tcp --permanent
firewall-cmd --reload

EPEL

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-1.noarch.rpm
rpm -ivh epel-release-7-1.noarch.rpm

I think it is also in the 'extras' package too

fail2ban

Install #EPEL (I think it is also in the 'extras' package too)

Install fail2ban

yum install fail2ban

Copy default config to local config:

cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local

Modify local config:

vi /etc/fail2ban/jail.local
  [sshd]
  enabled  = true

Restart fail2ban

sudo service fail2ban restart


References: