LinuxVPS安全設置之三:使用DDOSdeflate抵御少量DDOS攻擊

2022-10-08    分類: 網(wǎng)站建設

互聯(lián)網(wǎng)是豐富多彩的,基本上能夠找到我們需要的資源,也正因為如此很多朋友都加入到站長的行列中來。在眾多站長之間也會存在明爭暗斗的事情。尤其是我們個人站長,由于技術和財力有限,好不容易使用上主機、VPS后被攻擊沒有能力防御,導致我們的主機或者VPS商給我們的賬戶暫停,IP掛起等。尤其是我們在使用的VPS主機中,因為是按照流量消費的,在耗盡我們的流量,遭遇大量的DDOS攻擊之后,也束手無策,包括老左也看到之前也遭遇到DDOS攻擊。

在遇到這些問題的時候,我們是否能在VPS設置中進行處理呢?哪怕是一點點的防御。看到DDOS deflate腳本是可以協(xié)助VPS阻止攻擊進程的,如果遇到來自某個IP的持續(xù)攻擊,可以給該IP自動的設置成IP黑名單。只能說可以給我們的VPS一點點防御。

第一步,安裝。

?
1
2
3
wget http://myvps-scripts.googlecode.com/files/deflate.sh
chmod +x deflate.sh
./deflate.sh

第二步,配置/usr/local/ddos/ddos.conf文件。

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
##### Paths of the script and other files
PROGDIR="/usr/local/ddos"
PROG="/usr/local/ddos/ddos.sh"
IGNORE_IP_LIST="/usr/local/ddos/ignore.ip.list"
CRON="/etc/cron.d/ddos.cron"
APF="/etc/apf/apf"
IPT="/sbin/iptables"
 
##### frequency in minutes for running the script
##### Caution: Every time this setting is changed, run the script with --cron
#####     option so that the new frequency takes effect
FREQ=1
##### How many connections define a bad IP Indicate that below.
NO_OF_CONNECTIONS=150
##### APF_BAN=1 (Make sure your APF version is atleast 0.96)
##### APF_BAN=0 (Uses iptables for banning ips instead of APF)
APF_BAN=0
##### KILL=0 (Bad IPs are'nt banned, good for interactive execution of script)
##### KILL=1 (Recommended setting)
KILL=1
##### An email is sent to the following address when an IP is banned.
##### Blank would suppress sending of mails
EMAIL_TO="root"
##### Number of seconds the banned ip should remain in blacklist.
BAN_PERIOD=600

標示說明:

NO_OF_CONNECTIONS=150#大連接數(shù),超過會被屏蔽,默認即可
APF_BAN #默認是1,建議使用0,標示iptables限制
EMAIL_TO="" 填寫郵箱賬號,到時候有信息會發(fā)送到我們郵箱中
BAN_PERIOD=600 代表限制該IP 600秒

文章題目:LinuxVPS安全設置之三:使用DDOSdeflate抵御少量DDOS攻擊
網(wǎng)址分享:http://www.bm7419.com/news11/203461.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供外貿(mào)建站、做網(wǎng)站、手機網(wǎng)站建設標簽優(yōu)化、自適應網(wǎng)站網(wǎng)站排名

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

成都app開發(fā)公司