Hi Ray,
Ideally of course you would block the IP address "up-stream" because blocking it in the server doesn't help with DOS or DDOS attacks. On the other hand, it can be tricky to block it up-stream, so you can do it in the server as well.
Note that this is in the WebServer procedure, so if you were running in the Multi-Host, you would need to add this in the Multi-Host program.
This goes into the ThisWebServer.Process method;
case self.Packet.PacketType
of NET:SimpleNewConnection
if blacklisted(self.packet.fromip)
self._wait()
self.closeServerConnection(self.packet.OnSocket,self.packet.SockID)
self._release()
end
End
I would also caution that this will get called for _every_ incoming connection - ie potentially thousands and thousands of calls per day, so your Blacklisted function had pretty be _fast_. Definitely a memory-lookup, don't go reading a disk file at this point.
cheers
Bruce