If you are implying something like PeerGuardian's IP filter, this
lists instructions. (I have not checked them, so no idea whether they work or not). Anyway, AFAIK, IP filters is possible in most torrent applications. But, I second crts that if you want to "protect yourself" while downloading torrents, make sure that you don't download any illegal ones.