From owner-freebsd-questions@FreeBSD.ORG Thu Dec 16 18:45:44 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E56D16A4CE for ; Thu, 16 Dec 2004 18:45:44 +0000 (GMT) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0EE143D39 for ; Thu, 16 Dec 2004 18:45:43 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from [192.168.1.3] (pool-68-160-207-47.ny325.east.verizon.net [68.160.207.47]) by pi.codefab.com (8.12.11/8.12.11) with ESMTP id iBGIiLwx005029 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 16 Dec 2004 13:44:23 -0500 (EST) Message-ID: <41C1D782.3030703@mac.com> Date: Thu, 16 Dec 2004 13:44:18 -0500 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "traef06@ebasedsecurity.com" References: <20041216154043.5572E161A1@mail03.powweb.com> In-Reply-To: <20041216154043.5572E161A1@mail03.powweb.com> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.3 required=5.5 tests=RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL,TO_ADDRESS_EQ_REAL autolearn=disabled version=3.0.1 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on pi.codefab.com cc: freebsd-questions@freebsd.org Subject: Re: ipfw2 and preproc X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Dec 2004 18:45:44 -0000 traef06@ebasedsecurity.com wrote: > I have read the man page for ipfw and searched the web looking for examples > of using ipfw2 and the preprocessor option. > > Does anybody have any examples? Try somthing like the following in /etc/rc.conf: #firewall_type='/etc/MY_firewall' #firewall_flags='-p /usr/bin/cpp' ...and create /etc/MY_firewall containing: #### # set these to your inside interface network and netmask and ip #define IIF sis0 #define INET 192.168.1.0/24 #define IIP 192.168.1.2 # port number ranges #define LOPORTS 1-1023 #define HIPORTS 1024-65535 # dynamic rules add check-state add allow tcp from any HIPORTS to INET 22,80,143,443,3128 setup keep-state add allow ip from INET to any keep-state add 65000 deny log ip from any to any -- -Chuck