country based traffic filter

Asked by swissz

Hello!
Is there any way to filter the traffic on country base? I know there are some solutions to set up ip-tables rules for country-based filtering (http://www.debian-administration.org/articles/518), but I only want to filter the traffic of qBittorrent. I want to allow the traffic from my country only.

Question information

Language:
English Edit question
Status:
Solved
For:
qBittorrent Edit question
Assignee:
No assignee Edit question
Solved by:
Christophe Dumez
Solved:
Last query:
Last reply:
Revision history for this message
Best Christophe Dumez (hydr0g3n) said :
#1

qBittorrent provides IP filtering. Now it is just a matter for you to generate an ipfilter.dat file that contains the IP ranges of all countries except yours.

I think you can generate such file using this Web site:
http://www.countryipblocks.net/

On the top right, select all the countries, then unselect yours. Choose "IP Range" format and then hit "Choose country" button.
Save the output on your hard disk and load it from qbittorrent preferences.

Revision history for this message
swissz (zsarosi) said :
#2

Thanks Christophe! It is working the way I wanted to. I just noticed, that the ip-filter rules are not applied to the trackers, which is not a problem in my case, and since the trackers are usually chosen by the user, it shouldn't be for anyone.
Thanks again!