iT邦幫忙

0

fail2ban 封鎖 DNS 的 DDoS 攻擊

大家好
請問有熟fail2ban 防DDOS 這套件大大嗎?
目前遇到DNS server 的 DDOS 攻擊一直無法透過
fail2ban 阻擋下來不知道如何排除,目前fail2ban 有
作用但是就是找不到資料封但LOG 確實有資料,不
知道哪邊設定錯誤,請大家幫忙,謝謝

log
https://ithelp.ithome.com.tw/upload/images/20201226/20024460MPUaPbptUA.jpg

設定檔jail.conf
https://ithelp.ithome.com.tw/upload/images/20201226/20024460m30KcrzgVX.jpg

過濾器檔案
https://ithelp.ithome.com.tw/upload/images/20201226/20024460h6nqQMOQxg.jpg

狀態部份
https://ithelp.ithome.com.tw/upload/images/20201226/200244600bMLBJ1CrD.jpg

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0
ayu
iT邦好手 2 級 ‧ 2020-12-26 22:05:46

可參考我的作法, 新增一個jail
/etc/fail2ban/filter.d/x5-dns.conf

[Definition]
failregex = <HOST>#.*denied

ignoreregex =

/etc/fail2ban/jail.local

[x5-dns]
enabled = true
filter  = x5-dns
action   = iptables-allports[name=named]
logpath = /var/log/security.log
maxretry = 5
findtime = 180
bantime  = 3d

fail2ban.log
https://ithelp.ithome.com.tw/upload/images/20201226/20027379Re6zirsu8e.jpg

新二君 iT邦新手 2 級 ‧ 2020-12-27 23:36:30 檢舉

謝謝你的回答,我也覺得好像過濾器編寫上的條件,只是我不太懂過濾器裡面編寫上的方法,我試試看你的方法看看,有問題再請教你

我要發表回答

立即登入回答