|
Links: { Chris Lowth's Home Page | LinWiz | Kazaa Blocking 'FTWall' } |
||
|
|
FTwall V2 (P2P firewalling with Linux) Draft MAN PAGE NOTE: This Document is not complete.This document is currently a work in progress. It describes version 2.01 of ftwall reasonably well, but has not yet been updated to match the changes in 2.02. This page will be corrected in due course.
NAMEftwall - Fast Track Firewall. Control of IP traffic from Kazaa and its clones plus WinMX and OpenNAP.
MORE NAMES``Fast track'' is the networking protocol used by Kazaa, KazaaLite, iMesh and Grokster. ``Ftwall'' is part of the ``p2pwall'' project, which aims to provide similar mechanisms for other peer-to-peer file sharing protocols in future. ``P2pwall'' is short for ``Peer-to-peer traffic firewall''. Ftwall can also be used to block WinMX and OpenNAP clients, and in this sense the name of the program is a slight historical mis-noma.
USAGE SUMMARYSee the ``OPTION DETAILS'' section for more information on ftwall's options and their meanings. ftwall [option(s)]
-d what debug and stay in foreground. Show ..
A : All / everything
- : nothing (just stay in foreground)
d,a,D : DNS queries, answers, all
t : timelock
h : F.T. HTTP packet headers
p : F.T. probe events
l : show syslog messages on stdout too
-n don't block UDP packets (default: do)
-a ip set localhost address (default: 127.0.0.1)
-b number set socket buffer size (default: 32k)
-f filename set name of storefile (default: none)
-D filename set name of the DNS training file (default: none)
-t number set seconds of timelock. 0 disables (default: 120)
-c directory create/delete files here as clients appear/vanish
-l|L what set events to log to syslog|stderr (default: none)
u (U) : dropped (accepted) UDP packets
t (T) : dropped (accepted) TCP/IP packets
c : identified green-network clients
p : identified public-network peers
x : external command packets
m : add MAC address to log messages
DESCRIPTION``Ftwall'' is a program for linux firewalls that allows the control of network traffic from ``Fast Track'' peer-to-peer clients like ``Kazaa'' and it's derivatives, WinMX and OpenNAP clients. It is designed to block network traffic from P-2-P applications running in the ``home'' (or ``green'') network from making access to any peers on the public internet. It is ideal for use in networks where the security paradigm is ``open access'' for outbound connections and ``tightly limited'' access for inbound ones. Ftwall can be used in such a network to prevent outbound P2P access, hence preventing illegal file downloads and uploads. Anyone familiar with the technical problems assoicated with controlling P2P clients will be aware that a ``home'' client that establishes an ``outbound'' connection is typically immediately available to accept inbound connections through the established TCP/IP socket - even if the gateway firewall blocks all in-bound connections via ``normal'' TCP/IP and UDP mechanisms. This is a kind of limited ``tunnelling''. Ftwall solves this (and other) problems. ``Ftwall'' runs on Linux-based firewalls using kernel 2.4 (tested with 2.4.20) or later and iptables (test with version 1.2.6). This combination of version numbers is the current set employed by RedHat 8.0 - which is the system on which the software has been developed. ftwall runs well on the ``ipcop'' firewall, version 1.3.0 (GPL). I believe that it will run on Smoothwall 2 (GPL) although I have not tested this. It will NOT run on Smoothwall 1.0 since this is an ``ipchains'' based firewall, not an ``iptables'' one. Full details of the clients which have been tested with this software can be found on the p2pwall web site.
LIMITATIONSFtwall requires Linux kernel version 2.4, equipped with ``iptables'' and the ``QUEUE'' target. The ``ip_string'' match module of iptables is desirable, but not required, Ftwall works with the ``current'' version of the Fast track, WinMX and OpenNAP network protocols at the time of writing (July 2003). It is possible that it will need to be re-worked if these protocols are changed in future. Ftwall does not block P2P traffic transmitted via a SOCKS Proxy. For full protection you should configure your firewall to block SOCKS proxy traffic as well. At the time of writing, the p2pwall project does not include a HOWTO on SOCKS Proxy traffic control, but check the web site from time to time since one may appear there soon.
OPTION DETAILS
DNS AUTO-TRAININGFtwall supports the notion of blocking IP addresses on the basis of DNS name REGEX patterns. This allows us (for example) to block all servers with a domain name that ends with ``winxp.com'' or includes the label ``kazaa''. This cannot be done simply by using domain names as the arguments to iptables. To use this mechanism, ftwall must be passed all DNS answer packets that are being returned to clients AND DNS servers on the home network. The software inspects these packets and identifies IP addresses that relate to domain names that match any of the configured patterns. These IP addresses are then added to the hash of addresses that are ``blocked'' and all further out-bound TCP/IP connection (syn) packets to those addresses are DROPPED by the software. The DNS answer packets themselves are NOT blocked - but continue on their journey to their intended target. This logic effectively means that DNS exchanges are used to ``train'' the ftwall blocking mechanism. The list of DNS names to be blocked in this way is specified in a
configuration file. Each line in the file is either a The path name of the dns patterns file must be specified to the ftwall program using the option ``-D'', and iptables must be configured to pass DNS answer packets to the QUEUE target. Details of the relevant iptables rules are given in the INSTALL document.
BLOCKING WinMXIn order to block WinMX, the DNS Training mechanism (above) must be
configured to block domain names ending with ``.winmx.com''. This
effectively blocks the native WinMX protocol which uses hosts with these
names as directory servers. The \.winmx\.com$ WinMX is also capable of using the OpenNAP protocol. Files with an extension ``.wsx'' are needed to configure the networks and servers to be accessed. To block this protocol, the DNS training logic must be given a list of all the possible OpenNAP network servers that can be used by providing it with one or more valid ``wsx'' files. These files can be obtained from a number of sources..
IPTABLES RULESThe ``INSTALL'' document describes the iptables rules that you should configure in order to pass the relevant packets to ftwall for processing. ``Ftwall'' is very tightly tied to the correct iptables rules being used to pass it the traffic it requires. Errors in iptables rules building will cause it's logic to fail.
EXTERNAL COMMANDS
LICENSE``Ftwall'' is released under the terms of the ``GNU GENERAL PUBLIC LICENSE'' Version 2, June 1991. It comes with all the freedoms and disclaimers normally associated with that license.
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.
The ``lhash'' library is part of the ``OpenSSL'' project and is licensed as described in lhash/LICENSE.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)
This product includes software written by Eric Young
(eay@cryptsoft.com). This product includes software written by Tim
Hudson (tjh@cryptsoft.com).
AUTHORChris Lowth <chris@lowth.com> Please don't mail the author directly about this software, unless it is to discuss project funding, direct involvement or alternative license terms. If you wish to discuss the use of this tool, or problems associated with it, please make use of the ``help'' forum, accessed via the project web site (see below).
PROJECT HOME PAGEFtwall is part of the ``p2pwall'' project, the home page of which can be found at http://p2pwall.sourceforge.net. The project includes some public discussion and support forums and an announcements mailing list. The latter is a ``low traffic'' list that is focused on announcing new releases or patches to the software, and will typically deliver no more than a couple of messages a month.
SUPPORTING THE PROJECTIf you find this software useful, please consider supporting the project in one of these ways .. - Making a donation (how ever small) via PayPal - Shopping at Amazon.com or Amazon.co.uk using the links on Lowth.com. - Buying the author something on his Amazon.co.uk ``wish list''. - Sponsoring the development of a new feature or tool. Details of how you can help in any of these ways can be found at
http://www.lowth.com/donate.php
|