Question

I am getting a lot of spam/unwanted traffic from ips from China for eg. 125.116.123.14 as seen in my FTP logs with attempts log in etc.

Is there a way i can block this in Coldfusion Application.cfc? Currently i am manually going and blocking them on IIS.

Was it helpful?

Solution

It could be as simple as this in the top of Application.cfc:

<cfif Left(cgi.REMOTE_ADDR, 7) EQ "125.116">
    <cfabort/>
</cfif>

You can play with checking patterns and achieve some acceptable results.

But still, I would recommend to handle it at web-server level for better efficiency. I don't know much about advanced IIS stuff, but extensions like Dynamic IP Restictions may work for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top