2019年1月31日 星期四

準備開始吐文章的前言

最近實驗快要告一段落,部分精華的心得也該記錄一下。之前曾經用一台32G RAM的ESXi 主機做LAB,但是後來塵封一陣子以後,重新組回來發現主機板就這樣GG了。為了這樣於是我上淘寶找到了新的主機板,技嘉 GA-Z77P-D3的二手板來跑原來的 XEON E3 1230 V2這個窮人神器。但是我按錯運送方式,按到海運。

2019年1月7日 星期一

bearDropper for dorpbear sshd

在openwrt上,為了尋找sshguard / fail2ban之類的IPS工具,經過尋找後原來有簡單的ash腳本撰寫的 bearDropper ,thanks to robzr ,that’s awesome。


身為一個使用者,只要簡單的讓openwrt可以抓https

opkg install libustream-openssl ca-certificates ca-bundle

然後跑作者寫的安裝腳本(真貼心!!)

wget -qO- http://rawgit.com/robzr/bearDropper/master/install.sh | sh

調整一下/etc/config/bearDropper

config bearDropper
   # mode used if no mode is specified on command line; see bearDropper -h for help.
         option  defaultMode             entire

  # failure attempts from a given IP required to trigger a ban
         option  attemptCount            5

  # time period during which attemptCount must be exceeded in order to trigger a ban
         option  attemptPeriod           12h

  # how long a ban exist once the attempt threshold is exceeded
         option  banLength               1w

然後把記錄檔加大,vi /etc/config/system

config system
         option ttylogin '0'
         option log_size '256'

接著啟動服務

/etc/init.d/bearDropper start