How to knick out or block some IP that keep opening moodle pages repeatly at high speed

How to knick out or block some IP that keep opening moodle pages repeatly at high speed

โดย Trizit Benjaboonyazit -
Number of replies: 7

The other day, I found that my web (http://www.bangkaew.com/elearning/) is very slow, so I went to see the log file inside moodle  to find that someone has been opening my moodle pages repeatly at high speed ( more than 10-20 pages per second  from noon to night).  It is likely my moodle site is under attack to cause denial of service, is'n it ?.

I wonder if there is any way to  knick it out or block some IP inside the moodle software.

การประเมินโดยเฉลี่ย: -
In reply to Trizit Benjaboonyazit

Re: How to knick out or block some IP that keep opening moodle pages repeatly at high speed

โดย Trizit Benjaboonyazit -

Some sample data from log file is as follows,

Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum view discussion ช่วยแนะนำหน่อย
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum view discussion หลักของบรีดเดอร์
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum view discussion หลักของบรีดเดอร์
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum view discussion หลักของบรีดเดอร์
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum view discussion หลักของบรีดเดอร์
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum user report 116
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum view discussion ดูเองครับ
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum view discussion บางแก้วหาบ้านค่ะ
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum view discussion ชมรมฯจะเปิดสัมนาแลกเปลี่ยนเรียนรู้รื่องการเลือกซื้อและดุแลสุนัข
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum user report 116
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum view discussion ลูกชายก้าวร้าวเหมือนเดิม ทำงัยดี
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum view discussion ช่วยแนะนำหน่อย
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum view discussion พบบางแก้วแก่ ตาบอดสองข้าง หลงมา
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum view discussion ต้อนรับเจ้ามอเตอร์เวย์ เข้าโครงการ Foster Home รายแรก ของชมรมคนรักบางแก้ว
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.182.198  forum view discussion  น้องปลานีโม่ ณ ฉะเชิงเทรา 
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum view discussion ขอถามพี่เพื่อนบางแก้ว
Home(หน้าหลัก) อ. 7มีนาคม 2006, 10:23 PM 61.91.131.83  forum user report 116

การประเมินโดยเฉลี่ย: -
In reply to Trizit Benjaboonyazit

Re: How to knick out or block some IP that keep opening moodle pages repeatly at high speed

โดย Martin Dougiamas -
รูปภาพของCore developers รูปภาพของDocumentation writers รูปภาพของMoodle HQ รูปภาพของParticularly helpful Moodlers รูปภาพของPlugin developers รูปภาพของTesters
You could add a .htaccess file to the moodle directory containing:

Allow from all
Deny from 61.91.131.83 
การประเมินโดยเฉลี่ย:Useful (1)
In reply to Trizit Benjaboonyazit

Re: How to knick out or block some IP that keep opening moodle pages repeatly at high speed

โดย Michael Penney -
It could be a search bot, do you have "open to google" turned on in your variables settings?
การประเมินโดยเฉลี่ย: -
In reply to Trizit Benjaboonyazit

Re: How to knick out or block some IP that keep opening moodle pages repeatly at high speed

โดย Just H -
Hi

Without looking can't say if you can do it from within Moodle or not but for a quick fix you can ban IPs using .htaccess.

Regards
H
การประเมินโดยเฉลี่ย: -
In reply to Just H

Re: How to knick out or block some IP that keep opening moodle pages repeatly at high speed

โดย Trizit Benjaboonyazit -
Thanks all,  yes, I open mysite to google.
but it seems that the searching bot works too hard all day long,
I have tried .htaccess, but the server seems to not accept it, it cause error, file not found.
Maybe I have to ask my admin to enable .htaccess
Thank again.
การประเมินโดยเฉลี่ย: -
In reply to Trizit Benjaboonyazit

Re: How to knick out or block some IP that keep opening moodle pages repeatly at high speed

โดย N Hansen -
It's definitely not Google. It is coming from Bangkok itself. I looked up the ip address

การประเมินโดยเฉลี่ย: -
In reply to Trizit Benjaboonyazit

Re: How to knick out or block some IP that keep opening moodle pages repeatly at high speed

โดย Benoit Brosseau -
Assuming your running linux and you have a shell acces do a simple:

that will firewall this IP from ever connecting to your machine
การประเมินโดยเฉลี่ย: -