2023. 12. 21. 19:23 WorkHolic

CentOS 5 fail2ban 설치

728x90
반응형

 

 

CentOS 5 fail2ban 설치

 

ssh 무작위 접속 시도 차단에 fail2ban이 좋다.
아래와 같이 설치하면 된다.

 

1. EPEL Repo 설치

CentOS/RHEL 5, 64 Bit (x86_64):
# rpm -Uvh http://dl.fedoraproject.org/pub/archive/epel/5/x86_64/epel-release-5-4.noarch.rpm


2. fail2ban 설치

yum install fail2ban


3. /etc/fail2ban/jail.conf 수정

[ssh-iptables]

enabled  = true
filter   = sshd
action   = iptables[name=SSH, port=ssh, protocol=tcp]
           sendmail-whois[name=SSH, dest=you@example.com, sender=fail2ban@example.com, sendername="Fail2Ban"]
logpath  = /var/log/secure
maxretry = 5

4. 서비스 시작

/etc/init.d/fail2ban start

[root@kl151 fail2ban]# /etc/init.d/fail2ban start
Starting fail2ban:                                         [  OK  ]
[root@kl151 fail2ban]# fail2ban-client status
Status
|- Number of jail:      1
`- Jail list:           ssh-iptables

 

#CentOS5 #fail2ban

 

 

728x90
SMALL
Posted by gromet

블로그 이미지
나는 운이 좋은 사람이다 나는 나날이 점점 더 좋아진다 내가 하는 선택과 행동은 반드시 성공으로 이어진다 내게는 인내력과 지속력이 있다 네게는 좋은것들만 모여든다
gromet

공지사항

Yesterday
Today
Total
반응형

달력

 « |  » 2024.7
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

160x600