> > I've been using class BlacklistFilter for a while in this way: > > > > - Start my mina server > > - Read from DB those saved bad IPs > > - Create an instance of BlacklistFilter and add to it the bad IPs > > - Call DefaultIoFilterChainBuilder.addLast() to add the above > filter > > - Server continue running . > > - When detecting incoming bad requests from bad IPs, server saves > them to DB for use in next time restarting server
> I am not sure is the above the recommended/correct way to use > BlacklistFilter. I hope whenever bad IPs is detected, the filter can be > updated and take effect immediately, instead of waiting for next time > restarting server. Is it possible? If yes how? You can use them in the same cycle, by adding the same to the Blacklist filter and then saving to DB. This off course shall depend upon your business needs. see the block() API's in BlacklistFilter.java -- thanks ashish Blog: http://www.ashishpaliwal.com/blog My Photo Galleries: http://www.pbase.com/ashishpaliwal
