Linux/CentOS 7

From Omnia
Revision as of 16:49, 3 September 2014 by Kenneth (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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: