Prevent DoS/DDoS On Linux

Last month my server have been ddos by someone, so that I have search on the internet and see how can I prevent it. It’s juz very simple, as u know the linux firewall “iptable”. u can wirte a shell script monitoring the netstats and check whether an IP address have how many connections in this peroid. If there are more than X(u can set a variable on it) connections, the ip address will be ban for X minutes by iptables. Moreover, if there is any ip address has been banned, a email will sent to your administrator account, and I have tested by myself, it works! That’s a great shell script!

1

Checking how many connections does those IP address

2

If there are someone been banned, an email will be received

3

Testing the function:P 123.203.109.188 is my IP address and trying to hack DrKn(Kenny)’s Server 😛

21/1

尋日佢地約左我去唱K,7點係旺角新之城等。之後上左果度間neway唱K buffet!都幾抵食,唱左4個幾鐘俾勁大間房有電視有電腦,兩杯野飲都係$110/位

唱完都十一點,之後落左MK88不過冇乜game 玩:o) 所以轉移左去西洋菜街果間玩,打左一場機就行去旺角東坐車閃人。

dsc01981

$110位真係幾抵食,做埋果日7拆冇喇

dsc01983dsc01984

好大間房@@

19/1

好耐冇打過diary啦..因為近排真係好忙,好多野搞,今日開始會free啲喇!今日終於考完試!

回憶返呢一年,經歷左好多野… 好多野都好難忘…識左好多新朋友…學左好多野,多謝你地。

Internet programming 果科野既project 令我學識左呢個世界唔好咁易信人.. 可能自己好小講大話.. 不過令我知道呢個世界係幾現實.. 不過最後好彩自己做足自己本分,呀sir都知咩事..

暑假sem尾果陣,幫果公司寫web page果次係我第一次接觸到出面啲公司點運作點做野.. 最後好順利咁交到功課,做埋presentation 仲食左兩餐tim!

岩岩過左呢個sem 做果個fyproject 又係要同出面啲公司做野,佢地又教識左我好多野,真係好開心。希望下個sem 可以繼續合作啦~

暑假果陣砌左部新server,開始我既CS / web / vent server hosting 既業務,而家發展得算係咁,果度每個月都有一千左右的收入。

希望2009年會更好啦!