Koozali.org: home of the SME Server

Block torrent download using smeserver-webfilter

Offline masotsha

  • 14
  • +0/-0
Block torrent download using smeserver-webfilter
« on: February 03, 2015, 11:48:24 AM »
Hello. I have very limited bandwidth and cannot afford having users download torrents.  How do I block download of the torrents or at least access to such sites? Thanks

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Block torrent download using smeserver-webfilter
« Reply #1 on: February 03, 2015, 12:03:53 PM »
the short answer is "you can't".

the long one: you need a firewall that works at L7

the only things you can do with SME are:
- block access to torrent sites
- block download of .torrent files

there was a kernel module (see http://wiki.contribs.org/P2P_blocking) but it's unsupported.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Block torrent download using smeserver-webfilter
« Reply #2 on: February 03, 2015, 09:33:06 PM »
masotsha

I will keep saying it, try Dansguardian instead.
There are many ways of blocking "things" in DG that can be configured eg based on user, filenames (types), time of day & many more. Sometimes you have to think outside normal approaches.

Try also to add sites you want to block as Domains on sme server, configure to resolve DNS locally, & users will be redirected to your main domain website (eg when they try to login etc).
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Block torrent download using smeserver-webfilter
« Reply #3 on: February 03, 2015, 10:06:01 PM »
dansguardian is a (web) proxy server/filter.. it can do nothing to block p2p traffic..

let's say I have my laptop.. at home, I download a .torrent file and start a p2p session..
when I'm at office, with my laptop, I can download everything.

a right approach is to block all outgoing traffic but from SME itself, and it will work even if SME is in server-only mode..
but this approach can have unpredictable side effects on clients

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Block torrent download using smeserver-webfilter
« Reply #4 on: February 04, 2015, 01:20:56 AM »
Stefano
Quote
dansguardian is a (web) proxy server/filter.. it can do nothing to block p2p traffic..

Yes that's right p2p traffic is difficult to stop, but the question was how to stop access to torrent sites & stop downloads.
I am speaking generically.
If users cannot connect by logging in to their account etc, then they cannot proceed to do further transactions.
DG can assist to stop these services from being usable, but it may mean the admin has to think differently about the approach taken.

Quote
a right approach is to block all outgoing traffic but from SME itself, and it will work even if SME is in server-only mode..
but this approach can have unpredictable side effects on clients

So another approach may be to create iptables rules in the firewall, but if a user does something wrong the existing firewall integrity can be affected, so a good understanding of iptables rules is required.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.