Page 1 of 1
ban a range of ip#
Posted: Fri Nov 17, 2017 1:56 am
by anotherkat
I have been using qbt for a few years and have a huge thorn in my side. There's a peer who has a range of ip# they can (and do) use, and each time they pop up i can usually ban them manually. So find out qbt cannot ban a range natively, but can using a filter text file along the name of ipfilter.dat, composed easily with any text editor. So i look at some of the same format, and make a file with one entry, but for this forum i will use bogus numbers...
001.000.000.000 - 003.255.255.255 , 000 , badperson
I save the file, i click reload icon on qbt 3.3.3, it says it loaded and parsed ok. About 30 seconds later, i see a peer using ip 2.35.67.90. Obviously, this didn't work. So i edit it:
001.000.000.000 - 001.255.255.255 , 000 , badperson1
002.000.000.000 - 002.255.255.255 , 000 , badperson2
003.000.000.000 - 003.255.255.255 , 000 , badperson3
I save the file, i click reload icon, it says it loaded and parsed ok. About 30 seconds later, peer is back.
I tried closing qbt, making sure it's dead with taskmanager (windows vista), and restarting. Everything looks good. Except a few minutes in, i see badpeer.
The one IPFilter/BannedIPs line in qbittorrent.ini is 3.2k long, if i must add every ip for every block of ip this peer uses, that one line will be megabytes in length, and i expect qbt will barf on it.
Please tell me how to ban a range of ip in qbt !!!
Re: ban a range of ip#
Posted: Sat Nov 18, 2017 8:43 pm
by Switeck
Probably a bug, so not your fault.
qBT may not like anything other than "bare" ips and ip ranges in its ip filter file. ...No ports and no comments.
Re: ban a range of ip#
Posted: Tue Nov 21, 2017 1:51 am
by anotherkat
Since i am guessing in the wind here, i used a huge variety of formats for the ip#. I just tried adding the entire list of ip# from x.0.0.0 to x.255.255.255 to qbittorrent.ini , and qbt barfed and died when starting. Now, since a line like "xyz.000.00000.0 - xyz.255.255.255" doesn't work in ipfilter.dat, i am adding the entire list of 16,581,375 ip#s as "xyz.000.000.000 - xyz.000.000.000" to ipfilter.dat. After all, the qbt webpage says the .dat files work, right? I just haveto be lucky and stumble onto how.
Re: ban a range of ip#
Posted: Fri Nov 24, 2017 12:31 am
by tekno
[quote="anotherkat"]
I have been using qbt for a few years and have a huge thorn in my side. There's a peer who has a range of ip# they can (and do) use, and each time they pop up i can usually ban them manually. So find out qbt cannot ban a range natively, but can using a filter text file along the name of ipfilter.dat, composed easily with any text editor. So i look at some of the same format, and make a file with one entry, but for this forum i will use bogus numbers...
001.000.000.000 - 003.255.255.255 , 000 , badperson
I save the file, i click reload icon on qbt 3.3.3, it says it loaded and parsed ok. About 30 seconds later, i see a peer using ip 2.35.67.90. Obviously, this didn't work. So i edit it:
<SNIP>
Please tell me how to ban a range of ip in qbt !!!
[/quote]
I have never tried to use QBT's ip address blocking features. But a few ideas:
1) Try blocking your IP address ranges with your firewall.
2) Try upgrading your version of qBittorrent. I was just looking at the changelog. Version 4 adds some features that might help you. Here is an excerpt from the changelog:
* Mon Nov 20 2017 - sledgehammer999 <
[email protected]> - v4.0.0
- FEATURE: UI for managing locally banned IP list (dzmat)
- BUGFIX: Optimized IP filter parsing, making blazingly fast (sledgehammer999, evsh)
Re: ban a range of ip#
Posted: Mon Nov 27, 2017 12:37 am
by anotherkat
I downloaded the latest version, and ran some tests using a blockfile.dat to block ranges of ip#. It works! I reduced 16,777,216 lines in the .dat file, and a large list in the .ini file, to 5 lines in the .dat file. After a few minutes while i answered some emails, the execution log showed *pages* of blocked ip#, 5 different ip per second at times, but dns lookups point to the same source, and there's never any traffic on those ip ranges. It's great!
I noted some other changes tween 3.3.3 and 4.0.1. Bigger icons was a nice touch, no need to save bits by using the small ones. Nice to view the manual ban list (mine is empty now!) and be able to add/remove individual ones within qbt while it's running.
I'd like to make a minor suggestion: be able to load more than one .dat block files. Not a big deal, i am sure grouping problems within the one file will work ok too. But sharing such files would be easier, i suspect, if several could be loaded.
added:
Maybe a range could be supported in the ini file too?
Just got hit 38 times in one second, 6 unique ip# across a.*.*.* , b.*.*.* , and c.*.*.* , same "peer". I think they noticed something new. Thanks, developers!