Install mod_evasive for Apache to Prevent DDOS Attacks Cài đặt mod_evasive cho Apache để Ngăn chặn cuộc tấn công DDOS

mod_evasive, formerly known as mod_dosevasive is a Apache module that provides evasive maneuvers action in the event of an HTTP DoS or DDoS (Denial of Service) attack or brute force attack at the web server. mod_evasive, trước đây được gọi là mod_dosevasive là một mô-đun Apache cung cấp evasive maneuvers hành động trong trường hợp một HTTP DoS hoặc DDoS (Denial of Service) tấn công hoặc tấn công brute lực tại máy chủ trang web. When possible attacks are detected, mod_evasive will block the traffic from the source for a specific duration of time, while reports abuses via email and syslog facilities. Khi có thể tấn công được phát hiện, mod_evasive sẽ chặn lưu lượng truy cập từ mã nguồn cho một thời hạn cụ thể về thời gian, trong khi báo cáo lạm dụng thông qua email và các thiết bị syslog. Or administrators can configure mod_evasive to talk to iptables, ipchains, firewalls, routers, and etc. to build a comprehensive DDOS prevention system for the high traffic busy web server. Hoặc quản trị viên có thể cấu hình mod_evasive nói chuyện với iptables, ipchains, bức tường lửa, định tuyến, và vv để xây dựng một hệ thống toàn diện cho công tác phòng chống DDOS cao lưu lượng truy cập trang web phục vụ bận rộn.

Although mod_evasive is not a foolproof and complete DOS prevention system, but installing mod_evasive module for Apache will likely to reduce and stop certain DDOS attacks, minimizing the risks of web hosts and web sites been completely brought down inaccessible by malicious denial of service attack attempts. Mặc dù mod_evasive không phải là hệ điều hành DOS foolproof và hoàn tất hệ thống phòng, chống, nhưng mod_evasive mô-đun cài đặt cho Apache sẽ có khả năng để giảm và ngừng một số cuộc tấn công DDOS, giảm thiểu rủi ro của trang web và lưu trữ các trang web được đưa xuống hoàn toàn không độc hại của cuộc tấn công từ chối dịch vụ cố gắng.

How to Install mod_evasive Làm thế nào để cài đặt mod_evasive

  1. Login to web server via SSH. Đăng nhập vào máy chủ trang web thông qua SSH.
  2. For Apache 2.0.x, execute the following command: Đối với Apache 2.0.x, chấp hành các lệnh sau đây:

    up2date -i httpd-devel up2date-i httpd-devel

  3. Continue with the following commands one by one for all version of Apache HTTPD server. Tiếp tục với một trong các lệnh sau của một cho tất cả các phiên bản của máy chủ Apache HTTPD. wget command will download the current stable version 1.10.1 source tarball. wget lệnh sẽ tải về phiên bản hiện tại ổn định 1.10.1 mã nguồn tarball.

    cd /usr/local/src cd / usr / local / src
    wget http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz wget http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz
    tar -zxvf mod_evasive_1.10.1.tar.gz tar-zxvf mod_evasive_1.10.1.tar.gz
    cd mod_evasive cd mod_evasive

  4. For Apache 2.0.x , execute the following command: Đối với Apache 2.0.x, chấp hành các lệnh sau đây:

    /usr/sbin/apxs -cia mod_evasive20.c / usr / sbin / apxs-cia mod_evasive20.c

    Else, for Apache 1.3.x, Khác, cho Apache 1.3.x,

    /usr/local/apache/bin/apxs -cia mod_evasive.c / usr / local / apache / bin / apxs-cia mod_evasive.c

    Above commands will compile mod_evasive to .so and subsequently add corrensponding AddModule and LoadModule lines into httpd.conf. Lệnh trên sẽ biên mod_evasive đến. Như vậy và sau đó thêm corrensponding AddModule và dòng LoadModule vào httpd.conf.

  5. mod_evasive comes with default configuration value preset, however, if webmasters want to configure and set the value themselves, the following parameters have to be added into httpd.conf Apache configuration file below the AddModule section. mod_evasive đi kèm với cấu hình mặc định sẵn giá trị, tuy nhiên, nếu muốn webmaster để cấu hình và thiết lập giá trị bản thân, các tham số để có được thêm vào tập tin cấu hình httpd.conf Apache AddModule phần bên dưới.

    For Apache 2.0.x, add the following text to httpd.conf below AddModule section: Đối với Apache 2.0.x, và thêm những văn bản httpd.conf để AddModule phần dưới đây:

    <IfModule mod_evasive20.c> <IfModule Mod_evasive20.c>
    DOSHashTableSize 3097 DOSHashTableSize 3097
    DOSPageCount 5 DOSPageCount 5
    DOSSiteCount 100 DOSSiteCount 100
    DOSPageInterval 1 DOSPageInterval 1
    DOSSiteInterval 1 DOSSiteInterval 1
    DOSBlockingPeriod 600 DOSBlockingPeriod 600
    </IfModule> </ IfModule>

    For apache 1.3.x, add the following text to httpd.conf below AddModule section: Đối với apache 1.3.x, và thêm những văn bản httpd.conf để AddModule phần dưới đây:

    <IfModule mod_evasive.c> <IfModule Mod_evasive.c>
    DOSHashTableSize 3097 DOSHashTableSize 3097
    DOSPageCount 5 DOSPageCount 5
    DOSSiteCount 100 DOSSiteCount 100
    DOSPageInterval 1 DOSPageInterval 1
    DOSSiteInterval 1 DOSSiteInterval 1
    DOSBlockingPeriod 600 DOSBlockingPeriod 600
    </IfModule> </ IfModule>

    Save and exit the httpd.conf Apache configuration file. Lưu và thoát khỏi httpd.conf Apache tập tin cấu hình.

  6. Restart the Apache server with the following command: Khởi động lại máy chủ Apache với các lệnh sau đây:

    /etc/init.d/httpd restart / etc / init.d / httpd khởi động lại

Note: If apxs is not found, it can be installed via “yum install httpd-devel” command. Lưu ý: Nếu apxs là không tìm thấy, nó có thể được cài đặt bằng "yum cài đặt httpd-devel" lệnh.

Installation is completed. Cài đặt được hoàn tất. Note that mod_evasive has known issues with FrontPage Server Extensions. Lưu ý rằng mod_evasive đã biết vấn đề với FrontPage Server Extensions. Administrator can configure the variables such as enlarging the DOSHashTableSize especially for busy server. Quản trị có thể cấu hình các biến như mở rộng DOSHashTableSize đặc biệt là cho các máy phục vụ bận rộn. But note that whenever when a sournce of attack is blocked, the blocking duration is automatically extended whenever the source attempts to connect again, thus the DOSBlockingPeriod needs not to be too long. Tuy nhiên, lưu ý rằng bất cứ khi nào khi một cuộc tấn công của sournce bị chặn, thì chặn được tự động gia hạn thời gian bất cứ khi nào nguồn nỗ lực để kết nối lại, vì thế DOSBlockingPeriod nhu cầu không được quá dài. Beside, the blocking is based on each sessions of Apache child process, thus the blocking has the lifespan of that particular session only. Bên cạnh, các chặn được dựa trên mỗi phiên của Apache con quá trình, vì thế chặn có vong đơi của phiên chỉ cụ thể đó. If webmaster set the maximum clients per process to a very low value, the blocking may not be very effective. Nếu webmaster đặt tối đa cho mỗi khách hàng vào một quá trình rất thấp, giá trị, các chặn có thể không được rất có hiệu quả. All definitions of mod_evasive directives can be found on README file comes with the source codes. Tất cả các định nghĩa của các mod_evasive chỉ thị có thể được tìm thấy trên README tập tin đi kèm với các mã nguồn.

Other than above common configuration parameters, mod_evasive also supports the following three advanced directives: Khác với các tham số cấu hình phổ biến ở trên, cũng hỗ trợ mod_evasive sau ba nâng cao chỉ thị:

DOSEmailNotify users@example.com DOSEmailNotify users@example.com
DOSSystemCommand “su – someuser -c '/sbin/… %s …'” DOSSystemCommand "su - someuser-c '/ sbin / ... ...% s'"
DOSLogDir “/var/lock/mod_evasive” DOSLogDir "thư mục / var / khóa / mod_evasive"

The DOSEmailNotify is particular useful, where you can set mod_evasive to send a notification email whenever a possible DOS attack is detected and blocked. Các DOSEmailNotify là đặc biệt hữu ích, nơi bạn có thể thiết lập mod_evasive để gửi một email thông báo bất cứ khi nào có thể có một cuộc tấn công DOS, là phát hiện và chặn. For example, “DOSEmailNotify root” will send the email to root user. Ví dụ, "DOSEmailNotify gốc" sẽ gửi email đến người dùng gốc. But note that mailer configuration (by default is “/bin/mail -t %s”) in mod_evasive.c or mod_evasive20.c is correct. Tuy nhiên, lưu ý rằng thơ cấu hình (mặc định là "/ bin / mail-t% s") trong mod_evasive.c hoặc mod_evasive20.c là chính xác. You can create a symbolic link if needed to or modify the source code file. Bạn có thể tạo một symbolic liên kết hoặc nếu cần thiết để thay đổi mã nguồn tập tin.

IMPORTANT : The page is machine translated and provided "as is" without warranty. Lưu ý: Các trang web là máy tính dịch và cung cấp "như là" mà không có bảo hành. Machine translation may be difficult to understand. Máy dịch thuật có thể là khó hiểu. Please refer to Xin vui lòng tham khảo original English article Tiếng Anh bản gốc bài viết whenever possible. bất cứ khi nào có thể.


7 Responses to “Install mod_evasive for Apache to Prevent DDOS Attacks” 7 hồi đáp tới "Cài đặt mod_evasive cho Apache để Ngăn chặn cuộc tấn công DDOS"

  1. Securing apache the hackers way - Bảo vệ các tin tặc apache cách --
    July 5th, 2009 23:35 Tháng bảy 5, 2009 23:35
    7 7

    [...] [...] [...] [...]

  2. Webagentur Webagentur
    November 17th, 2008 23:44 17 tháng mười một, 2008 23:44
    6 6

    Ich habe dieses Modul auch bereits im Einsatz auf meinem Suse Linux 10.3 … die Installation war ein Kinderspiel für mich, nur würde ich gerne mal dieses neue Modul testen, weiss aber nicht wie ich das machen soll. Ich habe dieses Modul auch bereits im Einsatz auf meinem SUSE Linux 10,3 ... chết cài đặt chiến tranh Kinderspiel ein für mich, nur würde ich gerne mal dieses neue Modul testen, Weiss aber nicht wie ich das machen soll. Daher weiss ich auch nicht, ob es 100% funktioniert. Daher Weiss ich auch nicht, OB funktioniert es 100%.

  3. Nick Nick
    November 9th, 2008 22:07 9 tháng mười một, 2008 22:07
    5 5

    It is a great module. Đây là một mô-đun. The only problem is that the e-mail notification is not working. Các vấn đề chỉ là các e-mail thông báo là không hoạt động. It is a bug for years now, not fixed yet. Đây là một lỗi trong nhiều năm qua, hiện nay, không cố định nào được nêu ra. Although I have set DOSEmailNotify directive and I know that some IPs are blocked periodically, I never get any mail notification. Mặc dù tôi đã thiết lập DOSEmailNotify chỉ thị và tôi biết rằng một số IP đang bị cấm theo định kỳ, tôi không bao giờ nhận được bất kỳ email thông báo.

  4. Ömer Ersöz » Blog Archive » Mod_evasive Apache ddos Önlemi Ömer Ersöz »Lưu trữ Blog» Mod_evasive Apache ddos Önlemi
    November 5th, 2008 17:47 5 tháng mười một, 2008 17:47
    4 4

    [...] [...] http://www.mydigitallife.info/2007/08/15/install-mod_evasive-for-apache-to-prevent-ddos-attacks/ http://www.mydigitallife.info/2007/08/15/install-mod_evasive-for-apache-to-prevent-ddos-attacks/ [...] [...]

  5. geri1590 geri1590
    September 15th, 2008 23:52 15 tháng chín, 2008 23:52
    3 3

    Buenas, he seguido al pie de la letra todos los tutoriales que me he encontrado para el mod_evasive. Buenas, ông seguido al pie de la letra todos los que tutoriales tôi ông encontrado para el mod_evasive. Todos decian practimamente lo mismo.. Todos decian practimamente lo mismo .. asi que decidi postear en este. Asi que decidi postear en este.
    Cuando tengo el mod_evasive .. Cuando tengo el mod_evasive .. ejecuto el siguente comando: ejecuto el siguente commando:
    /usr/bin/apxs2 -c -i -a mod_evasive20.c / usr/bin/apxs2-c-i-một mod_evasive20.c
    y me muestra lo siguiente: y muestra tôi lo siguiente:
    /usr/share/apr-1.0/build/libtool –silent –mode=compile –tag=disable-static i4 86-linux-gnu-gcc -prefer-pic -DLINUX=2 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_RE ENTRANT -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/postgresql -I/usr/include/xmltok -pthread -I/usr/include/apache2 -I/usr/include/apr-1. / usr/share/apr-1.0/build/libtool-im lặng-chế độ = biên-tag = vô hiệu hóa-tĩnh i4 86-linux-gnu-gcc-thích-pic-DLINUX = 2-D_GNU_SOURCE-D_LARGEFILE64_SOURCE-D_RE ENTRANT-I / usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/postgresql -I/usr/include/xmltok-pthread -I/usr/include/apache2 -I/usr/include/apr- 1. 0 -I/usr/include/apr-1.0 -I/usr/include/postgresql -c -o mod_evasive20.lo mod _evasive20.c && touch mod_evasive20.slo 0 -I/usr/include/apr-1.0 -I/usr/include/postgresql-c-o mod_evasive20.lo mod _evasive20.c & & liên lạc mod_evasive20.slo
    /usr/share/apr-1.0/build/libtool: line 1222: i486-linux-gnu-gcc: command not fou nd / usr/share/apr-1.0/build/libtool: dòng 1222: i486-linux-gnu-gcc: lệnh không fou năm
    apxs:Error: Command failed with rc=65536 apxs: Lỗi: không thành công với Lệnh rc = 65536
    . .

    **Tengo la version 2.2 de Apache corriendo sobre Debian 4. ** Tengo la 2,2 phiên bản của Apache corriendo vê Debian, 4. – Si alguien me puede ayudar se lo agradecere - Nếu bạn tôi alguien puede ayudar se lo agradecere :)

  6. Carros Brasilia Carros Brasilia
    June 24th, 2008 23:17 Tháng sáu 24, 2008 23:17
    2 2

    Hi resimleri, you don't need to uninstall the module. Hi Resimleri, bạn không cần phải gỡ cài đặt các mô-đun.

  7. resimleri Resimleri
    June 3rd, 2008 16:07 3 tháng sáu, 2008 16:07
    1 1

    Hello Xin chào
    why mod_evasive uninstall? lý do tại sao mod_evasive bỏ cài đặt?

Leave a Reply Để lại một trả lời

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Bạn có thể sử dụng các thẻ:<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Đăng ký nhận xét tính năng đã bị vô hiệu hoá. To receive notification of latest comments posted, subscribe to Để nhận được thông báo về ý kiến mới nhất được đăng, đăng ký với My Digital Life Comments RSS feed Cuộc sống kỹ thuật số Bình luận của tôi nguồn cấp dữ liệu RSS or hoặc register to receive đăng ký để nhận được new comments in daily email digest. Các ý kiến mới trong thư điện tử tiêu hàng ngày.
Custom Search

New Articles Bài viết mới

Incoming Search Terms for the Article Tìm kiếm các điều khoản cho các Điều

apache ddos apache ddos - -- mod_evasive configuration mod_evasive cấu hình - -- apache mod_evasive apache mod_evasive - -- apache DOS attack apache tấn công hệ điều hành DOS - -- mod_evasive apache mod_evasive apache - -- mod_evasive mod_evasive - -- mod_evasive apache 2.2 mod_evasive apache 2,2 - -- apache mod evasive apache mod evasive - -- mod_evasive windows mod_evasive cửa sổ - -- apache ddos prevention apache phòng, chống ddos - -- install mod_evasive cài đặt mod_evasive - -- apache dos prevention apache dos phòng chống - -- dosemailnotify dosemailnotify - -- ddos apache ddos apache - -- mod_evasive iptables mod_evasive iptables - -- apache ddos attack apache ddos tấn công - -- mod_evasive apache2 mod_evasive apache2 - -- install mod evasive cài đặt mod evasive - -- mod_evasive cpanel mod_evasive cPanel - -- apache prevent dos apache ngăn dos - -- prevent DOS apache ngăn cản hệ điều hành DOS apache - -- installing mod_evasive cài đặt mod_evasive - -- apache2 mod_evasive apache2 mod_evasive - -- apache2 ddos apache2 ddos - -- how to install mod_evasive làm thế nào để cài đặt mod_evasive - -- apache dos module apache dos mô-đun - -- mod_evasive ddos mod_evasive ddos - -- mod_evasive download mod_evasive tải về - -- mod evasive mod evasive - -- mod evasive configuration mod evasive cấu hình - -- mod evasive apache mod evasive apache - -- apache ddos apache ddos - -- how to install Mod Evasive làm thế nào để cài đặt Mod Evasive - -- apache mod evasive howto apache mod evasive howto - -- configure mod_evasive cấu hình mod_evasive - -- download mod_evasive tải về mod_evasive - -- mod_evasive for Windows mod_evasive cho Windows - -- mod_evasive config mod_evasive cấu hình - -- mod_evasive parameters mod_evasive tham số - -- mod evasive apache2 mod evasive apache2 - -- mod evasive windows mod evasive cửa sổ - -- install mod_evasive cpanel cài đặt mod_evasive cPanel - -- apache ddos module apache ddos mô-đun - -- apache install mod_evasive centos apache mod_evasive cài đặt centos - -- apache anti ddos apache chống ddos - -- mod_evasive freebsd mod_evasive FreeBSD - -- mod_evasive install mod_evasive cài đặt - -- mod evasive download mod evasive tải - -- apache prevent dos attack apache phòng chống tấn công dos - -- mod evasive install mod evasive cài đặt - --