From: Josh G. <ja...@us...> - 2004-09-08 09:40:17
|
Update of /cvsroot/iptables-p2p/iptables-p2p/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15440 Modified Files: account-p2p.sh block-p2p.sh limit-p2p.sh Log Message: added copyright header Index: limit-p2p.sh =================================================================== RCS file: /cvsroot/iptables-p2p/iptables-p2p/examples/limit-p2p.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- limit-p2p.sh 8 Sep 2004 09:35:59 -0000 1.4 +++ limit-p2p.sh 8 Sep 2004 09:40:07 -0000 1.5 @@ -1,9 +1,19 @@ #!/bin/sh ############################################################################### ## -## iptables-p2p example script +## $Id$ ## -## Filipe Almeida <fi...@rn...> +## Copyright (C) 2003 Filipe Almeida <fi...@rn...> +## +## This program is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by the +## Free Software Foundation; either version 2, or (at your option) any +## later version. +## +## This program is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. ## ############################################################################### @@ -32,22 +42,21 @@ for i in $IFACES do - $TC qdisc del dev $i root - $TC qdisc add dev $i root handle 1: htb default $NORMAL - - $TC class add dev $i parent 1: classid 1:$ROOT htb \ + $TC qdisc del dev $i root + $TC qdisc add dev $i root handle 1: htb default $NORMAL + + $TC class add dev $i parent 1: classid 1:$ROOT htb \ rate $LINK_RATE \ ceil $LINK_RATE - - $TC class add dev $i parent 1:$ROOT classid 1:$NORMAL htb \ + + $TC class add dev $i parent 1:$ROOT classid 1:$NORMAL htb \ rate $LINK_RATE \ ceil $LINK_RATE - - $TC class add dev $i parent 1:$ROOT classid 1:$P2P htb \ + + $TC class add dev $i parent 1:$ROOT classid 1:$P2P htb \ rate $P2P_RATE \ ceil $P2P_RATE - - $TC filter add dev $i protocol ip prio 1 parent 1:0 \ - handle $P2P_MARK fw classid 1:$P2P -done + $TC filter add dev $i protocol ip prio 1 parent 1:0 \ + handle $P2P_MARK fw classid 1:$P2P +done Index: block-p2p.sh =================================================================== RCS file: /cvsroot/iptables-p2p/iptables-p2p/examples/block-p2p.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- block-p2p.sh 8 Feb 2004 01:01:36 -0000 1.2 +++ block-p2p.sh 8 Sep 2004 09:40:07 -0000 1.3 @@ -1,3 +1,20 @@ #!/bin/sh +############################################################################### +## +## $Id$ +## +## Copyright (C) 2003 Filipe Almeida <fi...@rn...> +## +## This program is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by the +## Free Software Foundation; either version 2, or (at your option) any +## later version. +## +## This program is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +############################################################################### iptables -A FORWARD -m p2p --p2p all -j DROP Index: account-p2p.sh =================================================================== RCS file: /cvsroot/iptables-p2p/iptables-p2p/examples/account-p2p.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- account-p2p.sh 8 Feb 2004 16:47:29 -0000 1.2 +++ account-p2p.sh 8 Sep 2004 09:40:07 -0000 1.3 @@ -1,4 +1,21 @@ #!/bin/sh +############################################################################### +## +## $Id$ +## +## Copyright (C) 2003 Filipe Almeida <fi...@rn...> +## +## This program is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by the +## Free Software Foundation; either version 2, or (at your option) any +## later version. +## +## This program is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +############################################################################### PROTOCOLS="fasttrack gnutella edonkey dc bittorrent openft" |