LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

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

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


IPT=/us/bin/iptables
STRING_="/etc/rc.d/strings"
IP_ALLOW="/etc/rc.d/ip"
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
fi

done < $STRING_

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

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 08:47 AM.

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