Güvenlik » Güvenlik Makaleler

Apache mod_qos ile Dos-dDos koruma

http://forum.whmdestek.com/

Go Back   WHM/cPanel Support Platform » Türkçe » Site, Sunucu Sorunlarınız ve Çözümleri » Güvenlik » Güvenlik Makaleler
 


Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 30.07.08, 02:29
Ni-Osman's Avatar
Linux HelpDesk
 
Join Date: Feb 2008
Location: Denizli
Posts: 271
Rep Power: 7012
Ni-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond repute
Send a message via MSN to Ni-Osman Send a message via Yahoo to Ni-Osman Send a message via Skype™ to Ni-Osman
Apache mod_qos ile Dos-dDos koruma

Webhosting firmalarının en büyük problemlerinden birisi rasgele kaynaklı saldırılardır. Dos ve dDos şu anda web hosting firmalarının olduğu gibi internetin de çok büyük bir sorunu bu aralar. Soruna kesin çözüm getirmeyen ama en azından “lamer” tabir edilen saldırganlara karşı geçici bir çözüm olabilecek yazılımlardan birisi de mod_qos dir. Unutmayın, daha iyi korunma daha profesyonel çözümler gerektirir. Bu yazılım şimdilik çok yeni ve daha çok yol kat edecek ancak işe yaradığı kanaatine vardık yapıtığımız testlerde. Daha detaylı testler ile perfomansını ölçeceğiz ve sizinle paylaşacağız Eğer siz de kurup denemek isterseniz işte size kısaca bir “howto” Sakın test sonuçlarınızı bize de yazmayı unutmayın. Bu kurulum Centos5 , WHM 11.23.2 ve Apache 2.2.8 kurulu bir sunucuda test edilmiştir.

Öncelikler cPanel sunucularda genelde bulunmayan ve bu yazılımın ihtiyaç duyduğu pcre paketlerini kuruyoruz.


yum -y install pcre pcre-devel


Kaynak kodumuzu indiriyoruz, arşivi açıp dizine giriyoruz


wget http://garr.dl.sourceforge.net/sourc...7.4-src.tar.gz
tar zxvf mod_qos-7.4-src.tar.gz
cd mod_qos-7.4/apache2/


Modülleri apxs ile derleyip Apache konfigürasyonuna ekliyoruz.


/usr/local/apache/bin/apxs -I/usr/include/pcre/ -iac mod_qos.c
/usr/local/apache/bin/apxs -I/usr/include/pcre/ -iac mod_qos_control.c


Şimdi mod_qos in kullandığı araçların derlenmesine geldi. Bunlardan birisi qslog, diğeri qsfilter2. Qslog , apache access_log ları inceleyerek istatistik oluşturuyor. Kullanmadım ama ilgilenenler için linki . Qsfilter2 ise yine access loglarını iceleyip , şüpheli istekleri engelleyecek kuralları oluşturan bir yazılım. cPanel de loglar her virtualhost için ayrı tutulduğu için sanırım bunu sunucu genelinde kullanmak için log ayarlarını değiştirmek gerekebilir. Umarım bu araçları ileride test edebilir ve sizi bilgilendirebiliriz. Şimdi kaldığımız yerden devam edelim.


cd ../tools/
make
cp qslog /usr/local/bin/
cd qsfilter/
nano Makefile


Bu kısımda Makefile içeriğinde değişklik yapmamız gerekmekte. Varsayılan apache kaynak kodları yolu cPanel sunculardaklinden farklı. O nedenle Makefile içinde geçen tüm “../../httpd” yollarını “/home/cpeasyapache/src/httpd-2.2.8/” olacak şekilde değiştiriyoruz. Bu sizin kurulumunuza göre değişiklik gösterebilir.


make
cp qsfilter2 /usr/local/bin
cd /usr/local/apache/conf
nano qos.conf


Oluşturduğumuz qos.conf dosyası mod_qos ayarlarının yapıldığı dosya olacak. Çokça ayar seçeneği var ancak biz en basitçe bu ayarları kullanacağız. Kısaca bir kaynak ip adresinden en fazla 10 bağlantı kabul edeceğiz ve toplam istek limitini virtual host başına 100 ile sınırlıyoruz. Unutmayın, her sunucunun konfigürasyonu hit profiline göre değişecektir. En iyi ayarları kendini bulabilirsiniz.


QSC_WorkingDirectory /var/tmp/qosc
QSC_Filter2Binary /usr/local/bin/qsfilter2
QS_SrvMaxConnPerIP 10
QS_LocRequestLimitDefault 100
<Location /qos>
SetHandler qos-viewer
</Location>


Kaydedip çıkıyoruz ve mod_qos geçici dosyalarının kaydedileceği klasörü oluşturuyoruz.


mkdir -p /var/tmp/qosc
chown nobody:nobody /var/tmp/qosc

Son olarak qos.conf u ayar dosyamıza Include ile ekliyoruz ve servisi yeniden başlatıyoruz.
nano httpd.conf
Şu satırı Include direktiflerinden birinin olduğu kısman yazın

Include "/usr/local/apache/conf/qos.conf"
service httpd restart


http://ip_adresiniz/qos linki ile mod_qos çalışması ile ilgili bilgi alabileceğiniz bir sayfaya ulaşabilirsiniz. Bunu sadece test ortamında açık tutmanızı öneririm. İşiniz bitince qos.conf içindeki <Location /qos> direktiflerini kaldırın.
Umarım işinizi görecektir. Bu en basit ayarları ile kurulmuş halidir. Daha ayrıntılı ayarları mod_qos dan bulabilirsiniz.

Unutmadan yazayım. “Caution! Use it on your own risk!”



Apache mod_qos ile Dos-dDos koruma | linux10.net
__________________
Netinternet Telekom
Artık daha çok zamanınız var!


Üyelik ve Partnerlikler :cPanel INC. , Parallels , DirectAdmin , Netenberg , RIPE , Redhat , Microsoft(Bitmedi) ,GeoTurst
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old 30.07.08, 04:25
HoST13's Avatar
Athlon Dual Core
 
Join Date: Jan 2008
Location: Trabzon
Age: 19
Posts: 331
Rep Power: 1
HoST13 will become famous soon enough
Send a message via MSN to HoST13
osman abi o kadar dedim sana gel şu linux sitesine forum kuralım ama yok
istersen hala kurabilirim.
__________________
WHMCS Destek | MyBB Destek
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old 30.07.08, 12:16
Ni-Osman's Avatar
Linux HelpDesk
 
Join Date: Feb 2008
Location: Denizli
Posts: 271
Rep Power: 7012
Ni-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond reputeNi-Osman has a reputation beyond repute
Send a message via MSN to Ni-Osman Send a message via Yahoo to Ni-Osman Send a message via Skype™ to Ni-Osman
Forumumuz var işte burası
__________________
Netinternet Telekom
Artık daha çok zamanınız var!


Üyelik ve Partnerlikler :cPanel INC. , Parallels , DirectAdmin , Netenberg , RIPE , Redhat , Microsoft(Bitmedi) ,GeoTurst
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old 30.07.08, 13:30
CaLViN's Avatar
Sevgi güçtür.
 
Join Date: Apr 2007
Location: Outta nation
Age: 27
Posts: 1,715
Rep Power: 100000
CaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond repute
burası hepimizin forumu
__________________
1.)Lütfen destek talebinde bulunmak için msn messenger üzerinden iletişime geçmeyiniz.
2.)Ücretsiz destek almak için forum sayfalarımızı kullanmanız aynı sorunu yaşayan diğer üyelerin cevaplara en kısa sürede ulaşabilmesi ve sizlere yardımcı olmak isteyen bizlerin ve diğer üyelerimizin zaman kazanmaları açısından çok önemlidir.
3.)Forumlarımızda sorunlarınızı anlatırken mümkün olduğunca çok detay vermeniz en kısa sürede sorununuza çözüm bulmanız açısından mühimdir.

Daha çok öğrenmek ve öğretmek dileğiyle..
Sevgiler..
The Platform.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old 30.07.08, 14:40
Onur's Avatar
SysAdmin
 
Join Date: Jun 2007
Location: Karaman
Age: 20
Posts: 865
Rep Power: 1013
Onur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond repute
Send a message via MSN to Onur
Quote:
Originally Posted by HoST13 View Post
osman abi o kadar dedim sana gel şu linux sitesine forum kuralım ama yok
istersen hala kurabilirim.
Forum vardı zaten uzun zamandır o sitede
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old 30.07.08, 15:51
SeLeNa's Avatar
Sempron
 
Join Date: Jul 2008
Posts: 40
Rep Power: 0
SeLeNa is on a distinguished road
apache serv restart attiktan sonra acilmaz oldu siteler yardım pls
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old 30.07.08, 16:02
SeLeNa's Avatar
Sempron
 
Join Date: Jul 2008
Posts: 40
Rep Power: 0
SeLeNa is on a distinguished road
bu kurdugumuz sey apache acilirken hata verdirtiyor nasıl sile bilirim bunu yardım eder misiniz sitelerin hic biri acilmiyor apache server acilmiyor
__________________
Linux İrc systems
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old 30.07.08, 21:07
Onur's Avatar
SysAdmin
 
Join Date: Jun 2007
Location: Karaman
Age: 20
Posts: 865
Rep Power: 1013
Onur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond repute
Send a message via MSN to Onur
service httpd restart

deyince çıkan hatayı buraya yazabilirmisiniz ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old 31.07.08, 01:14
haritSu's Avatar
Media Servers Projector
 
Join Date: Oct 2007
Location: İstanbul
Posts: 796
Rep Power: 1012
haritSu has a reputation beyond reputeharitSu has a reputation beyond reputeharitSu has a reputation beyond reputeharitSu has a reputation beyond reputeharitSu has a reputation beyond reputeharitSu has a reputation beyond reputeharitSu has a reputation beyond reputeharitSu has a reputation beyond reputeharitSu has a reputation beyond reputeharitSu has a reputation beyond reputeharitSu has a reputation beyond repute
Send a message via MSN to haritSu Send a message via Yahoo to haritSu
Muhahaha osman abiyi mahkemeye verecekler
__________________
Güzel gören güzel düşünür, Güzel düşünen hayatından lezzet alır...
Bediüzzaman Said Nursi
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old 31.07.08, 01:17
HoST13's Avatar
Athlon Dual Core
 
Join Date: Jan 2008
Location: Trabzon
Age: 19
Posts: 331
Rep Power: 1
HoST13 will become famous soon enough
Send a message via MSN to HoST13
yok bi ara r10da bi konu vardı o yüzden söyledim
__________________
WHMCS Destek | MyBB Destek
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
inetbase ddos koruma (Kurulum) Onursal Güvenlik Makaleler 26 14.10.08 15:09
Flood Koruma djmakay WHM 2086 2 23.07.08 20:52
DDoS Protected - DDoS korumalı Sunucu - Hosting nereden alınır ? CaLViN Dedicated, Managed, Co-Location 25 17.05.08 05:18
ddos koruması KORAL WHM Soru ve Cevaplar 2 14.04.08 18:53
SYN Saldırılar : Engelleme ve Koruma CaLViN Güvenlik Makaleler 5 24.08.07 00:26


Sign up for PayPal and start accepting credit card payments instantly.

Navigasyon
Menü