How do I stop spam attack on my website?
Within few hours of launching my website (http://www.winstondigital.com) on a droplet, my Nginx access log is filled with access requests like this:
*18.104.22.168 - - [22/Feb/2016:11:22:13 -0500] "GET http://zc.qq.com/cgi-bin/chs/numreg/init? HTTP/1.0" 404 1564 "-" "-"
First question is: how the domain "zc.qq.com" is mapping to my public IP address?
When I ping "zc.qq.com", it gives an IP address that is registered in China. It appears
that many others on the internet are getting spammed by these kind of attack.
Second question is: How can I stop these requests at the firewall, before it hits my application server (Rails). It seems harmless as all these requests are returned with a "404 Not found" error code. Still it is filling up my log files and creating unnecessary traffic.
Anyone else is seeing this problem?
Thanks for your help in advance.