pptpd for fail2ban 設定
原本的fail2ban並沒有pptpd的選項
我們假設pptpd vpn都設定好, 都連的上可以用了.
yum install epel-release
yum install fail2ban
#找個地方加入
vi /etc/fail2ban/jail.conf
[pptpd]
enabled = true
port = 1723
protocol = tcp
filter = pptp
logpath = /var/log/messages //任何有記錄連線失敗的LOG都可以, centos7是記錄在這裏
#失敗的定義
vi /etc/fail2ban/
加入
[Definition]
failregex = CTRL: Client <HOST> control connection finished
ignoreregex =
#local也要加
[pptp]
enabled = true
port = 1723
protocol = tcp
filter = pptp
logpath = /var/log/messages
bantime=600000
findtime=600
maxretry = 2
然後存檔離開
再用 fail2ban-client status 看看有沒有加入.
也讓別台故意連線失敗試看看有沒有成功被iptables擋下來