How do we configure nginx to prevent proxy abuse?

How do we configure nginx to prevent proxy abuse? (note that I have nginx set up as an onion server, which is the reason loopback IP is present in the logs)I found a few GET requests for content that I do not host nor have anything to do with, that returned a 200 status. The GET requests in question, from the log are as follows, and none of the URLs are mine:

127.0.0.1 – – [03/Dec/2015:02:19:41 -0600] “GET / HTTP/1.1” 200 >1159 “http://j4ko5c2kacr3pu6x.onion/” “Mozilla/5.0 (Windows NT 6.1; WOW64) >AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36”

127.0.0.1 – – [03/Dec/2015:02:32:28 -0600] “GET / HTTP/1.1” 200 >1159 “-” “S crapy/1.0.3 (+http://scrapy.org)”

127.0.0.1 – – [03/Dec/2015:03:05:43 -0600] “GET / HTTP/1.1” 200 >1159 “-” “Daniels Online-Test h ttp://tt3j2x4k5ycaa5zt.onion/test.php”

Answer

Attribution
Source : Link , Question Author : Scott Fulkerson , Answer Author : Community

Leave a Comment