#!/bin/sh # # Sample rc.local for ftwall on IPCop 1.3.0 by Chris Lowth # # ftwall - Fast Track Firewall. This program allows iptables firewalls # to filter traffic from Fast Track software such as Kazaa. # # Copyright (C) 2003, Chris Lowth # # 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 of the License, 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. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. . /var/ipcop/ethernet/settings /sbin/insmod ip_queue /sbin/insmod ipt_string rm -rf /var/log/ftwall.clients mkdir /var/log/ftwall.clients echo 128000 > /proc/sys/net/core/rmem_max /sbin/ftwall -b 128000 -l pc -c /var/log/ftwall.clients /sbin/iptables -A CUSTOMFORWARD -p udp -i $GREEN_DEV \ -m length --length 40 \ -m string --string KaZaA \ -j QUEUE /sbin/iptables -A CUSTOMFORWARD -p tcp -i $GREEN_DEV --syn \ -j QUEUE /sbin/iptables -A CUSTOMFORWARD -p tcp -i $GREEN_DEV \ -m string --string X-Kazaa \ -j QUEUE /sbin/iptables -A CUSTOMINPUT -p udp -i $GREEN_DEV --dport 1219 \ -m length --length 41 \ -j QUEUE