If you’re a geek like me, you may already be using IPFire as your main router software. It’s pretty powerful and allows you total control over your network. I recently had some troubles with it blocking my torrent / P2P traffic, so I thought I’d share the quick fix for enabling/disabling torrents and other P2P networks.
I’m not quite sure when this change came into effect. Searching Google for “IPFire torrents” doesn’t seem to come up with any recent mentions of the ability to filter torrent / P2P traffic. Also, I used to be able to download torrents without issue, so I think the ability to block these things may be a new feature.
Logging In
The first thing you’ll want to do is log into the IPFire interface. You can typically do this by going to https://{IPFireIP}:444/ in your browser. For example, if you have IPFire running with the IP 192.168.0.1, you’d go to https://192.168.0.1:444/.
Enabling / Disabling Torrent Traffic
Ok, now that you’re in, go to the “Firewall” tab and choose the “P2P networks” option. This will give you a list of P2P protocols that IPFire can control access to.
To enable torrents, ensure that the check box beside “Bittorrent” is checked.
To disable torrents,you guessed it, ensure that the check box beside “Bittorrent” is unchecked.
You can also enable / disable any of the other P2P services here.
Reload the Firewall Rules
We’re almost there! The final step is to reload the firewall rules. You can do this by going to Firewall > Firewall Rules and clicking “Apply Changes”.
Once that has been done, you’re all set. Fire up your favourite torrent or other P2P software and get sharing!
Lenard says:
Hi there i using Ipfire and struggling to block torrents i use this setting but torrent still allowed
Please help
Richard Marskell says:
In your case, you want make sure this setting is *not* checked. Unfortunately, if the users are using an encrypted tunnel, you won’t be able to block it since IPFire can’t actually see the packets. Let me know if this helps.
Lenard says:
Even if i unlock them you can still download torrent is there any way i can stop this>
Richard Marskell says:
What Core Update are you on? It should say in the bottom left corner. It looks something like: IPFire 2.15 (i586) – Core Update 81
Lenard says:
IPFire 2.15 (i586) – Core Update 83
Richard Marskell says:
Hmm. It should work. If you have access to the computer directly, you can block the program with a software firewall such as Comodo or PrivateFirewall. If you don’t have access, you can try to determine what ports the computer is using and block them with firewall rules. Just a quick note: make sure that after changing the P2P setting, you go into the firewall rules page and apply the changes. You can also try a reset of IPFire and see if that helps.
chris says:
Since core update 85 I can not shut off p2p network. Also I am no longer to use certain game clients. What gives???
Richard Marskell says:
I had an issue with an older version of IPFire when the drive filled up due to large log files (and undeleted update images). Basically, when it was full, none of the settings I saved worked. Might want to check that in Status > Media in the web interface. I haven’t updated to cu-85 yet, but I’ll do it now and let you know if I have the same issue. What game clients are being blocked?
Richard Marskell says:
I see in the change log for Core Update 84 they’ve “improved” the P2P algorithm. This could be the issue.
Darrell Burgher says:
I am looking for a way to schedule p2p on and off during certain times in the evening. Is there a way to do this via the cron? It would be nice to see a sceduler in the “P2P networks” section.
Darrell Burgher says:
I found the following:
/var/ipfire/firewall/p2protocols
if I do a sed and replace “Bittorrent;bit;off;” to “Bittorrent;bit;on;” and then reload the firewall “/etc/init.d/firewall reload” would that work?
Darrell Burgher says:
Just to let anyone else know who is trying this I got it working. I created to files “/usr/local/bin/bit_off” & “/usr/local/bin/bit_on”
I then place it in the cron (fcrontab) to run at the desired times. Then in ipfire under ‘Network -> Connection Scheduler’ I told it to reboot the firewall 5min past the desired times from the cron. My two files look like this.
bit_on:
sed -i ‘s/bit;off;/bit;on;/g’ /var/ipfire/firewall/p2protocols
/etc/init.d/firewall reload
bit_off:
sed -i ‘s/bit;on;/bit;off;/g’ /var/ipfire/firewall/p2protocols
/etc/init.d/firewall reload
happy torrenting