said
11-02-2013, بتوقيت غرينيتش 01:07 AM
السلام عليكم ورحمه الله وبركاته
هذا الدرس مفصل بحث عنه الكثير
نظراً لما يحدث هذه الايام من هذا النوع من الهجمات
أولا ينصح بتركيب install الجدار النارى CSF
يجب ايقاف الbdf لانه يتعارض مع الجدار النارى CSF
ويمكنك ايقافه عن طريق الامر التالى :
رمز Code:
sh disable_apf_bfd.sh
الان نقوم بتركيب install الCSF
رمز Code:
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:
<code style="white-space:nowrap"> <code> cd /etc/
mv sysctl.conf sysctl.conf.css
</code> </code>
رمز PHP:
<code style="white-space:nowrap"> <code> pico sysctl.conf
</code> </code>
ضع فيه التالي :
رمز PHP:
<code style="white-space:nowrap"> <code> # 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
</code> </code>
ثم احفظ الملف :
رمز PHP:
<code style="white-space:nowrap"> <code> cd /etc
mv host.conf host.conf.css
</code> </code>
رمز PHP:
<code style="white-space:nowrap"> <code> pico host.conf
</code> </code>
ضع فيه التالي :
رمز PHP:
<code style="white-space:nowrap"> <code> # 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
</code> </code>
هذه الاعدادات سوف تساعد في الحماية ضد هجمات Dos , DDos بالاضافة الى رفع مستوى عمل السيرفر SERVER
شرح طريقة تركيب install mod_dosevasive
اولا ندخل الى الشيل و نطبق الاوامر التالية
رمز Code:
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
رمز Code:
/usr/sbin/apxs -cia mod_evasive20.c
و اضافة اللي تحت في ملف httpd.conf
رمز Code:
<IfModule mod_evasive20.c> DOSHashTableSize 3097 DOSPageCount 6 DOSSiteCount 100 DOSPageInterval 2 DOSSiteInterval 2 DOSBlockingPeriod 600 </IfModule>
لاصحاب الاباتشي نسخة 1.3 x
رمز Code:
/usr/local/apache/bin/apxs -cia mod_evasive.c
اضافة اللي تحت في ملف httpd.conf
رمز Code:
<IfModule mod_evasive.c> DOSHashTableSize 3097 DOSPageCount 6 DOSSiteCount 100 DOSPageInterval 2 DOSSiteInterval 2 DOSBlockingPeriod 600 </IfModule>
و بعدذلك نقول بعمل ريسترت لل httpd وذلك بكتابة الامر التالي :
رمز Code:
/etc/init.d/httpd restart
الشرح طريقة من تجميعى فقط
ارجو ان اكون ساهمت فى حل المشكله
سلام عليكم
https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-ash4/482113_236967293114455_1193518507_n.png (http://www.dzbatna.com)
©المشاركات المنشورة تعبر عن وجهة نظر صاحبها فقط، ولا تُعبّر بأي شكل من الأشكال عن وجهة نظر إدارة المنتدى (http://www.dzbatna.com)©
هذا الدرس مفصل بحث عنه الكثير
نظراً لما يحدث هذه الايام من هذا النوع من الهجمات
أولا ينصح بتركيب install الجدار النارى CSF
يجب ايقاف الbdf لانه يتعارض مع الجدار النارى CSF
ويمكنك ايقافه عن طريق الامر التالى :
رمز Code:
sh disable_apf_bfd.sh
الان نقوم بتركيب install الCSF
رمز Code:
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:
<code style="white-space:nowrap"> <code> cd /etc/
mv sysctl.conf sysctl.conf.css
</code> </code>
رمز PHP:
<code style="white-space:nowrap"> <code> pico sysctl.conf
</code> </code>
ضع فيه التالي :
رمز PHP:
<code style="white-space:nowrap"> <code> # 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
</code> </code>
ثم احفظ الملف :
رمز PHP:
<code style="white-space:nowrap"> <code> cd /etc
mv host.conf host.conf.css
</code> </code>
رمز PHP:
<code style="white-space:nowrap"> <code> pico host.conf
</code> </code>
ضع فيه التالي :
رمز PHP:
<code style="white-space:nowrap"> <code> # 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
</code> </code>
هذه الاعدادات سوف تساعد في الحماية ضد هجمات Dos , DDos بالاضافة الى رفع مستوى عمل السيرفر SERVER
شرح طريقة تركيب install mod_dosevasive
اولا ندخل الى الشيل و نطبق الاوامر التالية
رمز Code:
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
رمز Code:
/usr/sbin/apxs -cia mod_evasive20.c
و اضافة اللي تحت في ملف httpd.conf
رمز Code:
<IfModule mod_evasive20.c> DOSHashTableSize 3097 DOSPageCount 6 DOSSiteCount 100 DOSPageInterval 2 DOSSiteInterval 2 DOSBlockingPeriod 600 </IfModule>
لاصحاب الاباتشي نسخة 1.3 x
رمز Code:
/usr/local/apache/bin/apxs -cia mod_evasive.c
اضافة اللي تحت في ملف httpd.conf
رمز Code:
<IfModule mod_evasive.c> DOSHashTableSize 3097 DOSPageCount 6 DOSSiteCount 100 DOSPageInterval 2 DOSSiteInterval 2 DOSBlockingPeriod 600 </IfModule>
و بعدذلك نقول بعمل ريسترت لل httpd وذلك بكتابة الامر التالي :
رمز Code:
/etc/init.d/httpd restart
الشرح طريقة من تجميعى فقط
ارجو ان اكون ساهمت فى حل المشكله
سلام عليكم
https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-ash4/482113_236967293114455_1193518507_n.png (http://www.dzbatna.com)
©المشاركات المنشورة تعبر عن وجهة نظر صاحبها فقط، ولا تُعبّر بأي شكل من الأشكال عن وجهة نظر إدارة المنتدى (http://www.dzbatna.com)©