This is a brief one. Questo è un breve uno. Thanks to Grazie a The How-To Geek Il How-To Geek for bringing this command into my troubleshooting repertoire. per portare questo comando nel mio repertorio di risoluzione dei problemi.
A bit of background first. Un po 'prima di sfondo. This command is helpful to determine who is causing the most hits to your web site. Questo comando è utile per determinare a chi sta provocando più colpisce per il tuo sito web. On my music blog, I post a fair number of (totally legal) MP3s. Sul mio blog di musica, ho posto un buon numero di (totalmente legale) MP3. Some less than ethical people often use those MP3s to stream via their site, causing mine to be slower (and a larger bandwidth bill). Alcuni meno di etica persone utilizzano spesso quelle per lo streaming MP3 attraverso il proprio sito, causando la miniera di essere più lento (e una più ampia larghezza di banda di legge). 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. Con capire l'indirizzo IP del sito / persona "rubare" la mia larghezza di banda si può bloccare il loro periodo di accedere a uno qualsiasi dei miei contenuti.
Note: you’ll need shell access to your web server log files Nota: devi shell di accesso al tuo server web i file di log
- SSH (or telnet) to your web host. SSH (o telnet) per il tuo host Web. Switch to the directory that stores your web server log files. Passare alla directory in cui viene memorizzato sul server Web i file di log.
- Run this command: Esegui questo comando:
tail -100000 access.log | awk '{print $1}' | sort | uniq -c |sort -n -100.000 coda access.log | awk '(print $ 1)' | sort | uniq-c | sort-n
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. dove 100000 è il numero di linee (a partire dalla fine del file di log) si desidera effettuare la ricerca, e access.log è il nome del tuo server web log di accesso.
- The result will be a (probably) fairly long list of IPs, sorted by fewest hits to most. Il risultato sarà una (probabilmente) abbastanza lungo elenco di indirizzi IP, ordinati per minor numero di colpi per la maggior parte. 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). Il primo valore in ogni riga è il numero di volte in cui l'indirizzo IP (il secondo numero) l'accesso al tuo sito (in numero di linee del file di log che hai specificato).
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). Utilizzare il comando di accoglienza per determinare il nome di dominio pienamente qualificato di qualsiasi indirizzo IP che mostra l'alto (probabilmente vi vogliono sapere che quelli che hanno colpito il tuo sito sono più). In the screenshot example below, two of the IPs that hit simplehelp.net the most were Googlebot and the Yahoo Site Crawler. Nella schermata seguente esempio, due dei PI simplehelp.net che ha colpito la maggior parte sono stati Googlebot e il sito del crawler di Yahoo.
- If there’s an IP/domain that looks suspicious, you can check to see which files they were hitting by using the command: Se c'è un IP / dominio che sembra sospetto, è possibile verificare quali file sono stati colpire utilizzando il comando:
tail -1000 access.log | grep xx.xx.xx.xx -1.000 coda 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. In questo comando, 1.000 è il numero di linee di verificare, access.log è il nome del tuo server web log di accesso, e xx.xx.xx.xx è il periodo che si desidera ordinare da. 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. Avevo consigliamo di utilizzare un numero minore (1000 vs 100.000 utilizzato nel primo comando), come probabilmente non è necessario / vogliono vedere tutti i file sono accessibili. If you do, increase the 1000 number. Se lo fai, aumentare il numero 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. Oppure, se non molto numerosi risultati visualizzati, che significa che essi sono stati colpire il tuo sito "precedenti", e si desidera aumentare 1000 a un numero più elevato.
























{ 2 comments… read them below or (2 ... leggere i commenti qui sotto o add one aggiungere uno } )
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. Il problema è che se qualcuno hotlinks il tuo mp3 (o immagini, o qualsiasi altro supporto), quindi è ancora l'IP dei propri utenti che verranno visualizzati nei tuoi log, non offendere il web. 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). Vale a dire, che sarà probabilmente abbastanza, anche la distribuzione degli utenti e indistinguibile da quello del vostro legittimo visitatori (a meno che qualcuno è continuamente aggiornato il contenuto multimediale).
What you want to be doing is checking for the referrer information to your media files (naturally excluding your own domain from the list). Che cosa si desidera fare è il controllo per referrer le informazioni per i file multimediali (ad esclusione naturalmente il proprio dominio dalla lista).
Tony - Tony --
Under normal circumstances yes, you’re absolutely right. In circostanze normali, sì, hai perfettamente ragione. 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. Nel mio caso specifico, il sito è stato caricato il file tramite un flash player che ha ospitato, e tutte le richieste provenienti da siti 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. Aggiunta di PI per il mio. Htaccess a sua volta interrotto il Flash Player da carico le canzoni per chiunque / tutti coloro che hanno provato a giocare dal explatives * * sito.
Leave a Comment Lascia un tuo commento