這里主要是APF_BAN=1修改為0(使用iptables),另外EMAIL_TO=root可以將root修改為你的一個(gè)Email地址,這樣系統(tǒng)辦掉哪個(gè)IP,會(huì)有郵件提示你。
#####Pathsofthescriptandotherfiles
PROGDIR=usrlocalddos
PROG=usrlocalddosddos.sh
IGNORE_IP_LIST=usrlocalddosignore.ip.listIP地址白名單
CRON=etccron.dddos.cron定時(shí)執(zhí)行程序
APF=etcapfapf
IPT=biniptables
#####frequencyinminutesforrunningthescript
#####Caution:Everytimethissettingischanged,runthescriptwith–cron
#####optionsothatthenewfrequencytakeseffect
FREQ=1檢查時(shí)間間隔,默認(rèn)1分鐘
#####HowmanyconnectionsdefineabadIP?Indicatethatbelow.
NO_OF_CONNECTIONS=150最大連接數(shù),超過這個(gè)數(shù)IP就會(huì)被屏蔽,一般默認(rèn)即可
#####APF_BAN=1(MakesureyourAPFversionisatleast0.96)
#####APF_BAN=0(UsesiptablesforbanningipsinsteadofAPF)
APF_BAN=0使用APF還是iptables。推薦使用iptables,將APF_BAN的值改為0即可。
#####KILL=0(BadIPsare’ntbanned,goodforinteractiveexecutionofscript)
#####KILL=1(Recommendedsetting)
KILL=1是否屏蔽IP,默認(rèn)即可
#####AnemailissenttothefollowingaddresswhenanIPisbanned.
#####Blankwouldsuppresssendingofmails
[email protected]當(dāng)IP被屏蔽時(shí)給指定郵箱發(fā)送郵件,推薦使用,換成自己的郵箱
#####Numberofsecondsthebannedipshouldremaininblacklist.
BAN_PERIOD=600禁用IP時(shí)間,默認(rèn)600秒,可根據(jù)情況調(diào)整
系統(tǒng)默認(rèn)白名單有些問題,經(jīng)常會(huì)有失誤,所以,我們最好再設(shè)定手工設(shè)置白名單并不可修改。
viusrlocalddosignore.ip.list#手工設(shè)置白名單IP
chattr+iusrlocalddosignore.ip.list#強(qiáng)制不允許修改
chattr-iusrlocalddosignore.ip.list#解除不允許修改
經(jīng)過上述的配置基本安全配置就OK了,當(dāng)然liunx平臺下還有很多同類的免費(fèi)防火墻不過基本上都是英文文獻(xiàn).需要多學(xué)習(xí)練習(xí)才能實(shí)際部署
信息發(fā)布:廣州名易軟件有限公司 http://www.jetlc.com