تدخل الى الشل و تدخل على الملف
كود PHP:
cd /etc/
mv sysctl.conf sysctl.conf.css
pico sysctl.conf
وتضع فيه التالي
كود PHP:
#Kernel sysctl configuration file for Centos 5.x
# http://www.securecentos.com
# See sysctl(8) and sysctl.conf(5) for more details.
kernel.panic = 60
net.ipv4.ip_forward=0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.lo.accept_source_route = 0
net.ipv4.conf.eth0.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.lo.rp_filter = 1
net.ipv4.conf.eth0.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.lo.accept_redirects = 0
net.ipv4.conf.eth0.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.log_martians = 0
net.ipv4.conf.lo.log_martians = 0
net.ipv4.conf.eth0.log_martians = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.lo.accept_source_route = 0
net.ipv4.conf.eth0.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.lo.rp_filter = 1
net.ipv4.conf.eth0.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.lo.accept_redirects = 0
net.ipv4.conf.eth0.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
kernel.sysrq = 0
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_keepalive_time = 1800
net.ipv4.tcp_window_scaling = 0
net.ipv4.tcp_sack = 0
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_syncookies = 1
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.conf.all.log_martians = 1
net.ipv4.tcp_max_syn_backlog = 1024
net.ipv4.tcp_max_tw_buckets = 1440000
net.ipv4.ip_local_port_range = 16384 65536
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.all.arp_ignore = 1
حفظ بي Crtl+x وبعدين Y
كود PHP:
/sbin/sysctl –p
sysctl -w net.ipv4.route.flush=1
ثم اعمل ريستارت للابتشي
كود PHP:
httpd restart
وتركيب
كود PHP:
wget http://www.inetbase.com/scripts/ddos/install.sh
chmod 0755 install.sh
./install.sh
وبعد ذالك
لظبط الاعدادات
كود PHP:
pico /usr/local/ddos/ddos.conf
تاكد من القيم كما هي هنا وضع بريدك
كود PHP:
APF_BAN=1
[email protected]
BAN_PERIOD=600
وان شالله يوقف الهجوم
تحياتي : معهد فواصل التطويري