How to determine which IP addresses are hitting your web site the most كيفية تحديد عناوين بروتوكول الإنترنت هي التي تصل إلى موقع الويب الخاص بك أكثر

by Ross McKillop on October 7, 2008 من جانب روس McKillop 7 تشرين الاول / اكتوبر ، 2008

الأمن

This is a brief one. هذا هو موجز واحد. Thanks to وبفضل The How-To Geek وقد لكيفية المهوس for bringing this command into my troubleshooting repertoire. لتحقيق هذه القيادة في بلادي مرجع استكشاف الأخطاء وإصلاحها.

A bit of background first. وهناك قليل من المعلومات الأساسية الأولى. This command is helpful to determine who is causing the most hits to your web site. هذه القيادة هو مفيد لتحديد من الذي يتسبب في معظم الزيارات إلى موقع الويب الخاص بك. On my music blog, I post a fair number of (totally legal) MP3s. الموسيقى على بلدي بلوق ، بعد عدد لا بأس به من (تماما القانونية) MP3s. Some less than ethical people often use those MP3s to stream via their site, causing mine to be slower (and a larger bandwidth bill). بعض الناس أقل من الأخلاقية وكثيرا ما تستخدم هذه MP3s لتيار عبر مواقعها ، مما تسبب الألغام إلى أن يكون أبطأ (وأكبر مشروع قانون عرض النطاق الترددي). By figuring out the IP address of the site/person “stealing” my bandwidth I can then block their IP from accessing any of my content. من جانب كشف الملكية الفكرية وعنوان الموقع / شخص ب "سرقة" بلادي النطاق الترددي أستطيع الملكية الفكرية ثم منع من الوصول إلى أي محتوى من بلدي.

Note: you’ll need shell access to your web server log files ملاحظة : عليك ان قذيفة الوصول إلى سجل مركز خدمة الويب الخاص بك ملفات

  1. SSH (or telnet) to your web host. SSH (أو التلنت) لاستضافة الويب الخاص بك. Switch to the directory that stores your web server log files. التبديل إلى دليل أن مخازن مركز خدمة الويب الخاص بك ملفات الدخول.
  2. Run this command: تشغيل هذا الأمر :

    tail -100000 access.log | awk '{print $1}' | sort | uniq -c |sort -n ذيل -100000 access.log | awk '(1) المطبوعة دولار' | النوع | uniq - ج | النوع بين ن

    where 100000 is the number of lines (starting from the end of the log file) you want to search, and access.log is the name of your web server access log. حيث 100000 هو عدد الخطوط (بدءا من نهاية لملف الدخول) تريد البحث عنها ، وaccess.log هو اسم مركز خدمة الويب الخاص بك الوصول إلى تسجيل الدخول.

  3. محطة الذيل مع النتائج awk النوع uniq

  4. The result will be a (probably) fairly long list of IPs, sorted by fewest hits to most. ستكون النتيجة (ربما) قائمة طويلة نسبيا من البرامج المتكاملة ، بحسب أقل عدد من الزيارات إلى أكثر. The first value in each row is the number of times the IP address (the second number) accessed your site (in the number of lines of the log file you specified). أول قيمة في كل صف هو عدد المرات التي تتناول الملكية الفكرية (العدد الثاني) الوصول إلى موقعك (في عدد من الخطوط من ملف الدخول الذي قمت بتحديده).

    Use the host command to determine the fully qualified domain name of any IP address that shows up (you’ll probably want to know who the ones that hit your site the most are). استخدام المضيف للقيادة لتحديد اسم مجال مؤهل بالكامل من أي معالجة الملكية الفكرية أن يظهر (عليك ربما تريد أن تعرف أن الذين هم ضرب موقعك هي أكثر). In the screenshot example below, two of the IPs that hit simplehelp.net the most were Googlebot and the Yahoo Site Crawler. لقطة للشاشة في المثال التالي ، وهما من البرامج المتكاملة التي بلغت أكثر simplehelp.net Googlebot وكانت ياهو الموقع الزاحف.

  5. محطة مع ذيل awk النوع uniq

  6. If there’s an IP/domain that looks suspicious, you can check to see which files they were hitting by using the command: اذا كان هناك الملكية الفكرية / المجال أن يبدو مشكوكا فيه ، ويمكنك التحقق من الملفات التي ترى أنها ضرب من خلال استخدام القيادة :

    tail -1000 access.log | grep xx.xx.xx.xx ذيل -1000 access.log | grep xx.xx.xx.xx

    In that command, 1000 is the number of lines to check, access.log is the name of your web server access log, and xx.xx.xx.xx is the IP you want to sort by. في أن قيادة ، 1000 هو عدد من خطوط التحقق ، access.log هو اسم مركز خدمة الويب الخاص بك الوصول تسجيل الدخول ، وxx.xx.xx.xx هو الملكية الفكرية التي تريد الترتيب حسب. I’d suggest using a smaller number (1000 vs. 100000 as used in the first command) as you probably don’t need/want to see every file they accessed. فما استقاموا لكم فاستقيموا لهم نقترح عليك استخدام عدد أقل (1000 مقابل 100000 كما هو مستخدم في أول قيادة) وأنتم ربما لا حاجة / نريد ان نرى انهم الاطلاع على كل ملف. If you do, increase the 1000 number. إذا ، زيادة عدد 1000. Or, if not very many results show up, that means that they were hitting your site “earlier”, and you’ll want to increase 1000 to a higher number. أو ، إن لم يكن كثير جدا حتى تظهر النتائج ، فإن ذلك يعني أنها تصل إلى موقعك "في وقت سابق" ، وسترغب في 1000 لزيادة عدد أكبر.

Related Posts: الوظائف ذات الصلة :
  • Why you get email that isn’t addressed to you لماذا تحصل على رسالة البريد الإلكتروني التي ليست موجهة إليكم
  • How to use vMailias to generate unique email addresses for easy sorting and filtering كيفية استخدام vMailias فريدة من نوعها لتوليد عناوين البريد الإلكتروني للمن السهل فرز وغربلة
  • How to secure your wireless home network كيفية تأمين الشبكة المنزلية اللاسلكية الخاصة بك
  • How to transfer Outlook auto-complete addresses to a new computer كيف توقعات لنقل السيارات ويتناول الكامل لجهاز كمبيوتر جديد
  • Joost Invites تدعو جوست
  • Get Simple Help tutorials just like this one in your email inbox every day - for free! الحصول على مساعدة بسيطة مثل هذه الدروس واحد في صندوق الوارد في بريدك الإلكتروني كل يوم -- لالحرة! Just enter your email address below: فقط أدخل عنوان البريد الإلكتروني الخاص بك أدناه :

    You can always opt out of this email subscription at any time. يمكنك دائما أن تختار الانسحاب من الاشتراك في هذا البريد الإلكتروني في أي وقت.


    Bookmark and Share المرجعية والاسهم

    { 2 comments… read them below or (2 التعليقات... قراءتها أو أقل add one إضافة واحد } )

    1 1 Tony توني 10.07.08 at 2:58 pm 10.07.08 في الساعة 2:58

    The problem is that if someone hotlinks your mp3s (or images, or any other media), then it’s still the IPs of their users that will show up in your logs, not the offending webserver. والمشكلة هي انه اذا شخص hotlinks الخاصة بك mp3s (أو الصور ، أو بأية وسيلة أخرى) ، ثم انها لا تزال البرامج المتكاملة من المستخدمين التي تظهر في السجلات الخاصة بك ، وليس الاساءة الى الشبكة العالمية. That is to say, it will likely be a fairly even distribution of users and indistinguishable from that of your legitimate visitors (unless someone is just continuously refreshing your media content). وهذا يعني ، انه من المرجح ان توزيعا متناسبا إلى حد ما من المستخدمين وتمييزه عن أن المشروع الخاص بك من الزوار (ما لم يكن مجرد شخص تجدد باستمرار وسائل الإعلام مضمون).

    What you want to be doing is checking for the referrer information to your media files (naturally excluding your own domain from the list). ما تريد فعله هو التحقق من الإحالات للمعلومات الخاصة بك إلى ملفات وسائط الإعلام (باستثناء بطبيعة الحال المجال الخاص بك من القائمة).

    2 2 Ross روس 10.07.08 at 3:05 pm 10.07.08 في الساعة 3:05

    Tony - توني --

    Under normal circumstances yes, you’re absolutely right. في ظل الظروف العادية نعم ، أنت على حق تماما. In my specific case, the site was loading the files via a flash player that they hosted, and all the requests came from the sites flash player. في بلدي حالة معينة ، كان موقع تحميل الملفات عن طريق لاعب ومضة أنها استضافت ، وجميع الطلبات جاء من مواقع فلاش لاعب. Adding the IP to my .htaccess in turn stopped the flash player from loading the songs for anyone/everyone who tried to play them from the *explatives* site. واضاف ان الملكية الفكرية لبلدي. htaccess بدوره توقف العاجل لاعب من تحميل الأغاني عن أي شخص / الجميع الذين حاولوا لعب لهم من explatives * * الموقع.

    Leave a Comment ترك التعليق

    You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> يمكنك استخدام هذه العلامات والصفات هتمل : <ahref="" title=""> <abbrtitle=""> <acronymtitle=""> <b><blockquotecite=""> <cite><code> <deldatetime=""> <em><i><qcite=""> <strike><strong>