fail2ban 운용법 > 개발

본문 바로가기
사이트 내 전체검색

개발

fail2ban 운용법

페이지 정보

profile_image
작성자 관리자 (119.♡.119.69)
댓글 0건 조회 557회 작성일 25-02-07 18:12

본문

fail2ban 운용법



## 기본 설정

```
[DEFAULT]
bantime = 30m # 30분 동안 차단한다
findtime = 10m # 10분 동안의 데이터를 가지고 판단한다
maxretry = 5 # 5번 이상 로그인 실패했을시 차단한다
```
* 참고 : https://hacktam.kr/etclec/195



## fail2ban-client

```
# fail2ban-client -t
# fail2ban-client realod
# fail2ban-client restart 
```
* 참고 : https://blog.naver.com/forioso/221962585413



## port 여러개 지정 방법 multiple port
```
port = 80 ( single port )
port = 80,443 ( multiple ports)
port = 8080:8090 ( port range )
port = 80, 8080:8090 ( comination is also possible )
```
* 참고 : https://github.com/webmin/webmin/issues/158



## xxx.xxx.xxx.xxx already banned

ssh 의 port 번호를 변경한 경우, 해당 포트들을 모두 지정해 주어야 한다. 위 multiple port 참조.

그리고, 이 경우 reload 로는 바로 적용이 안되는 듯 하다. already banned 가 계속 나온다.

restart 를 해 주면, 기존 ip 들을 모두 Unban 시키고, 재시작 되면서 Restore Ban 시킨다.
이 과정에서 포트 번호가 적용이 되는 듯 하다. 

* 참고 : https://github.com/fail2ban/fail2ban/wiki/How-fail2ban-works



## DROP instead of REJECT

jail.local
```
[DEFAULT]
banaction = iptables-multiport[blocktype=DROP]
banaction_allports = iptables-allports[blocktype=DROP]
```
* 참고 : https://unix.stackexchange.com/questions/751448/fail2ban-ssh-jail-change-action-reject-to-drop

추천0

댓글목록

등록된 댓글이 없습니다.

Total 404건 1 페이지
  • RSS
개발 목록
번호 제목 조회 추천 날짜
404389003-19
403388003-17
402542002-25
401497002-25
열람중558002-07
399543001-10
398610001-10
397603010-31
396669010-28
3951355009-23
3941846007-06
3931572007-02
3921480006-23
3911796006-23
3901456006-20
3891164006-15
3881254006-15
3871346005-27
3861758004-07
3852593002-02

검색


사이트 정보

Copyright © Baragi.Net. All rights reserved.