728x90
반응형
[명령어]
service fail2ban start / stop
fail2ban-client status sshd
fail2ban-client status mysqld-auth
whois 패키지 쓸라면?? -> yum install jwhois
[DEFAULT]
ignoreip = 127.0.0.1/8 192.168.0.1/255
bantime = 7200
findtime = 600
maxretry = 3
destemail =
sender = root@API-WH
mta = sendmail
action = %(action_mw)s
action_ = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
action_mw = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
%(mta)s-whois[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", protocol="%(protocol)s", chain="%(chain)s"]
action_mwl = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
%(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]
logpath = /var/log/fail2ban.log
[sshd]
enabled = true
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
maxretry= 3
bantime = 7200
728x90
반응형
'OS > Centos' 카테고리의 다른 글
Cent OS 6 버전 yum 에러 (0) | 2021.02.04 |
---|---|
설치 에러 발생시 대처 (0) | 2019.10.23 |
CentOS 7 / 고정 IP 설정하는 방법 (0) | 2019.10.22 |
Centos 파일, 디렉토리 찾기 (0) | 2019.10.22 |
Centos 6, 7 포트 추가 (0) | 2019.10.22 |