Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 10-17-2007, 02:07 AM   #1
LQ Newbie
Registered: Sep 2007
Posts: 25

Rep: Reputation: 15
Why this script wont block bittorrent, kazaa and other p2p apps

if [ -e $STRING_ ]; then
while read STRING_TRAP; do
$IPT -I INPUT -p tcp -m string --string $STRING_TRAP --algo kmp \
-d 0/0 --dport 80 -j LOG --log-level info \
--log-prefix "P2P Apps Connection Attempts"
$IPT -I INPUT -p tcp -m string --string $STRING_TRAP --algo kmp \
-d 0/0 --dport 80 -j REJECT

if [ -e $IP_ALLOW ]; then
while read IP_TRAP; do
$IPT -A INPUT -s $IP_TRAP -p tcp -m tcp -d 0/0 \
--dport 80 -m string --string $STRING_TRAP \
--algo 'kmp' -j LOG --log-level info \
--log-prefix "Allowed IP to Use P2P Apps"
$IPT -A INPUT -s $IP_TRAP -p tcp -m tcp -d 0/0 \
--dport 80 -m string --string $STRING_TRAP \
--algo 'kmp' -j ACCEPT
done < $IP_ALLOW

done < $STRING_

echo "No file containing string found..."
Old 10-17-2007, 02:55 PM   #2
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
crackyblue, I've moved your post (which you originally made here) into a thread of its own.

In the future, please refrain from hijacking other people's threads.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
p2p on Linux -> any suggestions on kazaa client? tisam Linux - Software 6 12-30-2004 08:38 AM
p2p programs more like kazaa madskillz Linux - Newbie 3 10-06-2003 08:20 AM
REDHAT P2P USING kAzAa Net? kazykid22 Linux - Software 1 09-21-2003 01:35 PM
which p2p actually uses the same network as Kazaa? ereeno Linux - Software 1 07-30-2003 03:28 PM
Please help, my firewall script block connection to Kazaa on my windoze machine cojo Linux - Networking 2 02-17-2003 11:44 AM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration