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