Portal Home > Knowledgebase > Articles Database > How to stop p2p file sharing / torrents [ cpanel server]


How to stop p2p file sharing / torrents [ cpanel server]




Posted by greenreader, 05-28-2010, 10:39 PM
I have received a complaint of p2p file shearing regarding my server. (This server uses to offer shared web hosting and did not offer ssh access) Is there a way to stop p2p file sharing / torrents on a cpanel server? I have Disable X BitTorrent Tracker by deleting the following files /usr/share/mime/application/x-bittorrent.xml /usr/share/zsh/4.2.6/functions/_bittorrent But it was not enough. I have received the complaint again. Server Os: CENTOS 5.4 x86_64 Control Panel : cpanel Could you please help me. Thank you.

Posted by Lisvo, 05-28-2010, 11:16 PM
Can you find out which customer of yours is doing it?

Posted by fabin, 05-29-2010, 02:22 AM
You can block p2p traffic using an iptables module called ipp2p.

Posted by seemoose, 05-29-2010, 11:11 AM
You could always write a cron job which kills all processes with the word "torrent" in them. Have it run every minute, and log the output to a log file. Sure, its not blocking the traffic, but it will annoy anyone trying to run torrents. It will also help you identify who the culprit is

Posted by vincent91326, 05-29-2010, 11:27 AM
haha i like the way you think

Posted by greenreader, 05-29-2010, 12:21 PM
Thank you. But I am not a linux expert guy. Could you please send me a link to such a script/code/command.

Posted by greenreader, 05-29-2010, 12:23 PM
I'll try it also. Thank You.

Posted by seemoose, 05-29-2010, 09:50 PM
This is one that one of our techs came up with a few months back, still works a treat: You can probably choose a better location to send the log file, but its entirely up to you. Save the above contents into a file and call it something like "torrent_kill.sh" and edit your crontab to execute that file (torrent_kill.sh) every minute.

Posted by OpenInternet-Vince, 05-29-2010, 10:06 PM
Instead of killing the process. Just firewall the server up. Block all ports except for those standard needed ports.

Posted by seemoose, 05-29-2010, 10:42 PM
Of course, thats the long term solution. But my solution for lol's

Posted by sharmaine1111, 05-30-2010, 06:44 AM
Tried ps faux | grep torrent | grep -v grep | grep -v "${0}" but it's giving an error Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more information.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
better deal? (Views: 475)
FlareWall (Views: 469)