الكثيري نت  
 
   

الكثيري نت للاستضافه والدعم الفني


العودة   الكثيري نت > سوق الاستضافه > دروس - وحلول مشاكل الاستضافه

إضافة ردإنشاء موضوع جديد
 
أدوات الموضوع انواع عرض الموضوع
  #1  
قديم أضيفت بتاريخ 07-12-2008, 02:19 PM
الصورة الرمزية alktheri
alktheri alktheri غير متواجد حالياً
المشرف العام
 
تاريخ التسجيل: 12-11-2007
الدولة: السعوديه
المشاركات: 618
معدل تقييم المستوى: 105
alktheri is a jewel in the roughalktheri is a jewel in the roughalktheri is a jewel in the roughalktheri is a jewel in the rough
F Icon01 الحماية ضد Dos , DDos +تقوية sysctl.conf و host.conf

السلام عليكم ورحمه الله وبركاته

هذا الدرس بحث عنه الكثير

نظراً لما يحدث هذه الايام من هذا النوع من الهجمات

أولا ينصح بتركيب الجدار النارى CSF

يجب ايقاف الbdf لانه يتعارض مع الجدار النارى CSF

ويمكنك ايقافه عن طريق الامر التالى :


كود:
sh disable_apf_bfd.sh

الان نقوم بتركيب الCSF

كود:
cd /root
rm -fv csf.tgz
wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh
ثم تذهب بعد ذلك الى الWHM

بعدها تذهب الي WHM ثم ConfigServer Security&Firewall

ثم firewall configuration لتعديل اعدادات تشغيل الاسكربت

في الخانه الأولي TESTING = ضع امامها القيمه 0

AUTO_UPDATES = ضع أمامها القيمه 1 ليقوم الأسكربت بالترقيه .

أحفظ الاعدادات بعدها تأكد أن الأسكربت

Firewall Status: Running







♦ تقوية sysctl.conf و host.conf

كود PHP:
cd /etc/
mv sysctl.conf sysctl.conf.css 
كود PHP:
pico sysctl.conf 
ضع فيه التالي :

كود PHP:
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.
 
# Controls IP packet forwarding
net.ipv4.ip_forward 0
 
# Controls source route verification
net.ipv4.conf.default.rp_filter 1
net
.ipv4.conf.all.rp_filter 1
net
.ipv4.conf.lo.rp_filter 1
net
.ipv4.conf.eth0.rp_filter 1
 
# Do not accept source routing
net.ipv4.conf.default.accept_source_route 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
 
# Disable ICMP Redirect Acceptance
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
 
# Enable Log Spoofed Packets, Source Routed Packets, Redirect Packets
net.ipv4.conf.all.log_martians 0
net
.ipv4.conf.lo.log_martians 0
net
.ipv4.conf.eth0.log_martians 0
 
# Lower retry rates
net.ipv4.tcp_synack_retries 2
net
.ipv4.tcp_syn_retries 3
 
# Controls the System Request debugging functionality of the kernel
kernel.sysrq 0
 
# Max File Handlers
fs.file-max 8192
# Disable CTR+ALT+DEL Restart Keys
kernel.ctrl-alt-del 1
 
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid 1
 
# Decrease the time default value for tcp_fin_timeout connection
net.ipv4.tcp_fin_timeout 15
 
# Decrease the time default value for tcp_keepalive_time connection
net.ipv4.tcp_keepalive_time 1800
 
# Turn off the tcp_window_scaling
net.ipv4.tcp_window_scaling 0
 
# Turn off the tcp_sack
net.ipv4.tcp_sack 0
 
# Turn off the tcp_timestamps
net.ipv4.tcp_timestamps 0
 
# Enable TCP SYN Cookie Protection
net.ipv4.tcp_syncookies 1
 
# Enable ignoring broadcasts request
net.ipv4.icmp_echo_ignore_broadcasts 1
 
# Enable bad error message Protection
net.ipv4.icmp_ignore_bogus_error_responses 1
 
# Log Spoofed Packets, Source Routed Packets, Redirect Packets
net.ipv4.conf.all.log_martians 1
 
# Increases the size of the socket queue (effectively, q0).
net.ipv4.tcp_max_syn_backlog 1024
 
# Increase the tcp-time-wait buckets pool size
net.ipv4.tcp_max_tw_buckets 1440000
 
# Allowed local port range
net.ipv4.ip_local_port_range 16384 65536 
ثم احفظ الملف :

كود PHP:
cd /etc
mv host
.conf host.conf.css 
كود PHP:
pico host.conf 
ضع فيه التالي :

كود PHP:
# Lookup names via DNS first then fall back to /etc/hosts
order hosts,bind
# Check for IP address spoofing.
nospoof on
# multiple IP addresses
multi on 
هذه الاعدادات سوف تساعد في الحماية ضد هجمات Dos , DDos بالاضافة الى رفع مستوى عمل السيرفر




شرح تركيب mod_dosevasive





اولا ندخل الى الشيل و نطبق الاوامر التالية


كود:
cd /usr/local/src
wget http://www.nuclearelephant.com/proje..._1.10.1.tar.gz
tar -zxvf mod_evasive_1.10.1.tar.gz
cd mod_evasive

لاصحاب الاباتشي نسخة 2.0 x

كود:
/usr/sbin/apxs -cia mod_evasive20.c
و اضافة اللي تحت في ملف httpd.conf

كود:
<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 6
DOSSiteCount 100
DOSPageInterval 2
DOSSiteInterval 2
DOSBlockingPeriod 600
</IfModule>
لاصحاب الاباتشي نسخة 1.3 x


كود:
/usr/local/apache/bin/apxs -cia mod_evasive.c
اضافة اللي تحت في ملف httpd.conf

كود:
<IfModule mod_evasive.c>
DOSHashTableSize 3097
DOSPageCount 6
DOSSiteCount 100
DOSPageInterval 2
DOSSiteInterval 2
DOSBlockingPeriod 600
</IfModule>
:n066:
و بعدذلك نقول بعمل ريسترت لل httpd وذلك بكتابة الامر التالي :

كود:
/etc/init.d/httpd restart



سلام عليكم

__________________

 
اقتباس:


رد مع اقتباس
إضافة ردإنشاء موضوع جديد

مواقع النشر (المفضلة)


تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع

المواضيع المتشابهه
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
[ برنامج ] : شرح تقوية اشارة الوايرلس asd_2000 قسم البرامج العامه والمشروحه 0 أضيفت بتاريخ 07-09-2009 04:32 PM
[ برنامج ] : حصري البرنامج العملاق مساعد يعمل على تقوية خصائص كروت شاشات nVIDIA asd_2000 قسم البرامج العامه والمشروحه 0 أضيفت بتاريخ 26-08-2009 08:00 AM
[ برنامج ] : تقوية اللغة الانجليزية لدى كل شخص asd_2000 قسم البرامج العامه والمشروحه 0 أضيفت بتاريخ 19-08-2009 07:39 PM
[ برنامج ] : تقوية اللغة الانجليزية لدى كل شخص asd_2000 قسم البرامج العامه والمشروحه 0 أضيفت بتاريخ 17-08-2009 03:04 AM


الساعة الآن 07:45 AM.

 
استضافة وتـــــــــــــطــويـــر » الكثيري نت لخدمات الويب

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.