DoS

antidot

New member
DoS

יש לי שרת שכרגע שרד DoS. מהלוגים שלו אני בינתיים רואה שההתקפה כנראה לא הגיעה לשרת עצמו, אלא לשרתים שנמצאים בחווה לידו. אומנם זה ידוע שאין אפשרות למנוע DoS על השרת, בהזדמנות זו אני רוצה לעשות review לקונפיגורציה. מדובר בשרת לינוקס + אפאצ'י - Fedora (מה לעשות שאני חובב RH) /etc/sysctl.conf מכיל את הקונפיגורציה הבאה:
# Controls IP packet forwarding net.ipv4.ip_forward = 0 # Controls source route verification net.ipv4.conf.default.rp_filter = 1 # Controls whether core dumps will append the PID to the core filename. # Useful for debugging multi-threaded applications. kernel.core_uses_pid = 1 #Disabling IP Spoofing attacks. #Comment this line out when using IPSEC 2 net.ipv4.conf.all.rp_filter = 2 #Don't respond to broadcast pings net.ipv4.icmp_echo_ignore_broadcasts = 1 #Enable SYN Cookies net.ipv4.tcp_syncookies = 1 #Block source routing net.ipv4.conf.all.accept_source_route = 0 #Kill timestamps. These have been the subject of a recent bugtraq thread net.ipv4.tcp_timestamps = 0 #Kill redirects net.ipv4.conf.all.accept_redirects = 0 #Enable bad error message protection net.ipv4.icmp_ignore_bogus_error_responses = 1 #Log martians (packets with impossible addresses) #RiVaL said that certain NICs don't like this. Comment out if necessary. net.ipv4.conf.all.log_martians = 1 #Set out local port range net.ipv4.ip_local_port_range = "1024 41000" #Reduce DoS'ing ability by reducing timeouts net.ipv4.tcp_fin_timeout = 30 net.ipv4.tcp_keepalive_time = 1800 net.ipv4.tcp_window_scaling = 1 net.ipv4.tcp_sack = 0 net.ipv4.tcp_max_syn_backlog = 1280​
נשאלת השאלה: איזה אופטימיזציות נוספות ניתן לבצע על מנת לצמצם נזק שיכול להגרם כתוצאה מDoS. כיוון שאני לא גורו של אפאצ'י, אשמח לשמוע על פרמטרים שיש לשים אליהם לב. שוב, בהנחה שהשירותים שרצים לא כוללים חורי אבטחה, המטרה היא למנוע מצב של שרת ש"נחנק" ואח"כ לא יוצא מזה (אפאצ'י שעושה spool ליותר מדי instances, מקצה יותר מדי זיכרון וכו'). אני מצרף גם חלק רלוונטי מהגדרות הiptables....
 
למעלה