luni, 24 august 2009

Ban IP's using uTorrent

How To Kick and Ban IP's using uTorrent via ipfilter.dat

OK so this is a guide to using ipfilter.dat - for banning a specific peer (or more for when you need to);

Open Notepad and then minimize it... open uTorrent's window, go to Options > Preferences and then go to Advanced at the bottom. Name and Value columns will appear so find "ipfilter.enable" in the Name column and single click on it, now look at the bottom and Value should be set to True already, if its on False then set it to True and click OK to get out of the settings...

Now select the torrent task you want to observe the peers on; when a task is selected, information is displayed at the bottom like tracker status etc and you can see that when you are obviously on the "General" tab so now click on the "Peers" tab and all the connected peers appear along with their IP add, client name, flags and stats etc for the specific torrent task you selected... along the top where it says "IP", "Client" etc, right-click and tick "Port" so the peers port numbers appear.

Some peers will have country flags next to them as the hosts names are currently being displayed so right-click on any peer and click on "Resolve IPs" - after doing that, IP addresses appear for each peer instead of the previous hostnames etc.

If you find someone in the peer list you want to ban, type the IP address of that peer in notepad and then put a space next to it, add a dash "-" sign, another space and then type that same IP again so if you were going to ban IP address, it should look like this in Notepad: - (so uTorrent will filter that range only)

Now that you have added a peer to be banned in that SPECIFIC IP range, save the Notepad file as ipfilter.dat and then go to uTorrent's folder by opening My Computer and then pasting in: %AppData%uTorrent in the address bar.

You will then be taken to the uTorrent folder which contains some .dat files for settings etc and may also have some .torrents you have previously added to the client. Drag ipfilter.dat into the uTorrent folder and then you are more or less done.

Now go to back to uTorrent > Options > Preferences > Advanced and change ipfilter.enable to False and then to True again so it reloads the filter, then click OK to get out of Preferences... now click on the Logger tab located along the same line as "General", "Peers" etc in the bottom half of uTorrent and you should see the following:

Loaded ipfilter.dat (X entries)

If it says that, you've got it to work... the 'X' typed above refers to the number of IP entries the filter has loaded... I added 1 IP for testing so it says 1 entries.

If you want to add another IP range to ban another specific peer, open ipfilter.dat with Notepad and add the new IP add you want to ban on a new line, which should be done in the same way I explained above to ban that first specific peer... then save the filter file and go to back to uTorrent; Options > Preferences > Advanced and set ipfilter.enable to False and then True again to reload it without having to restart uTorrent... going back to the Logger tab should tell you the filter is loaded and with how many entries its loaded... it will also say "IpFilter blocked peer [ip-address-here]" whenever they (banned peers) are trying to connect to you.

uTorrent will also auto-ban peers after a certain number of hashfails, in addition, the below list will come handy when looking at peer lists:

What do all those flags in the Flags column mean?

* D = Currently downloading (interested and not choked)
* d = Your client wants to download, but peer doesn't want to send (interested and choked)
* U = Currently uploading (interested and not choked)
* u = Peer wants your client to upload, but your client doesn't want to (interested and choked)
* O = Optimistic unchoke
* S = Peer is snubbed
* I = Peer is an incoming connection
* K = Peer is unchoking your client, but your client is not interested
* ? = Your client unchoked the peer but the peer is not interested
* X = Peer was included in peerlists obtained through Peer Exchange (PEX)
* H = Peer was obtained through DHT.
* E = Peer is using Protocol Encryption (all traffic)
* e = Peer is using Protocol Encryption (handshake)