�?u ti�n n�i tr�?c ��y ch? l� code h?n ch? m?c �? c?a DDOS v� ng�n ch?n c�c cu?c t?n c�ng DDOS th�ng th�?ng m� th�i.
Gi?i thi?u:
Code n�y d?a tr�n ph��ng th?c �?m s? Request trong 1 kho?ng th?i gian nh?t �?nh do Admin ch?nh. N?u S? Request v�?t m?c cho ph�p s? kh�a truy c?p t? IP �� trong 1 kho?ng th?i gian x�c �?nh t�y theo m?c �? (V? m?c �? m?nh s? n�i ti?p ph?n sau)
N?u IP �� c� qu� nhi?u l?n c� t?ng request trong th?i gian quy �?nh v�?t m?c cho ph�p th? ta s? d�ng file htaccess kh�a v?nh vi?n s? truy c?p t? IP ��. T?c l� host c?a m?nh s? ko ch?p nh?n b?t k? 1 request n�o n?a ngo�i vi?c ��a ra th�ng b�o 403 Forbiden
T�c gi? Laivt_Firewall:
V? Th�nh Lai - Admin sinhvienit.net
B�?c 1: Download file: DOWNLOAD
B�?c 2: Gi?i n�n c�c b?n s? dc c�c file sau:
laivt_firewall.php
laivt_firewall_conf.php
laivt_firewall_unlock.php
laivt_firewall_install.php
laivt_firewall_uninstall.php
.htaccess
V� th� m?c:
laivt_firewall
C�c b?n m? file laivt_firewall_conf.php l�n �? c?u h?nh Firewall
//--Cau hinh firewall--//
$laivt_fw_conf['max_lockcount']=10;//So lan toi da phat hien dau hieu DDOS va khoa IP do vinh vien
$laivt_fw_conf['max_connect']=15;//So ket noi toi da dc gioi han boi $laivt_fw_conf['time_limit']
$laivt_fw_conf['time_limit']=3;//Thoi gian dc thuc hien toi da $laivt_fw_conf['max_connect'] ket noi
$laivt_fw_conf['time_wait']=20;//Thoi gian cho de dc mo khoa khi IP bi khoa tam thoi
$laivt_fw_conf['email_admin']='admin@sinhvienit.net';//Email lien lac voi Admin
$laivt_fw_conf['htaccess']="../.htaccess";//Duong dan toi file htaccess tren server
//--Ket thuc cau hinh Firewall--//
B�?c 3: Sau khi c?u h?nh xong, c�c b?n upload 2 file/th� m?c sau.
laivt_firewall.phpL�n ngang h�ng v?i file index.php c?a code b?n �ang d�ng.
laivt_firewall_conf.php
Th� m?c laivt_firewall
Up xong th? chmod 777 cho th� m?c laivt_firewall v� chmod 404 cho file .htaccess trong th� m?c n�y
B�?c 4: M? file wp-load.php v� th�m �o?n code sau xu?ng d�?i <?php
if (file_exists("laivt_firewall.php"))
include_once "laivt_firewall.php";
Ch� ?: File laivt_firewall_unlock.php d�ng �? m? kh�a c�c IP b? block. Tuy nhi�n khi ch?y file n�y n� s? x�a s?ch t?t c? n?i dung b�n trong file .htaccess c?a web, c� th? d?n t?i l?i web. V? v?y file n�y kh�ng up l�n c?ng ��?c n�n trong b�i n�y m?nh b? qua file ��. C�c b?n th�ch th? up l�n nh� :))
Done. Have fun.
Anti ddos cho wordpress v?i Laivt_Firewall
4/
5
Oleh
Unknown