From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 19 10:40:34 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9EB5016A4CE for ; Sat, 19 Jun 2004 10:40:34 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.205]) by mx1.FreeBSD.org (Postfix) with SMTP id 303B143D1D for ; Sat, 19 Jun 2004 10:40:34 +0000 (GMT) (envelope-from viktor.ivanov@gmail.com) Received: by mproxy.gmail.com with SMTP id 73so12210rne for ; Sat, 19 Jun 2004 03:40:20 -0700 (PDT) Received: by 10.38.164.70 with SMTP id m70mr14835rne; Sat, 19 Jun 2004 03:40:20 -0700 (PDT) Message-ID: <7f4bda01040619034050be53a2@mail.gmail.com> Date: Sat, 19 Jun 2004 13:40:20 +0300 From: Viktor Ivanov To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: ipfw2 test utility X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jun 2004 10:40:34 -0000 Hello -hackers. I'm thinking about an utility to test a simple packet against the machine's firewall (ipfw2 to be more specific). I needed it because on some of my routers the configuration got complicated and the rule count is too high. And sometimes I need to see quickly what a colleague have done to the firewall and why it's not working as expected. Is there an (easy) way to take the packet-matching code from the kernel and use it to check a (manually) constructed packet on the current ipfw2 rule set? I was planning on writing a simple script that reads the output of `ipfw list' and then does some very simple checks. Mostly I need to look what's done to packets from certain address/network coming from a certain interface. Sometimes I need to check on tcp streams too. Maybe I should just write a good script to build proper rule sets and not try to fix a problem by creating more problems :) Any comments are welcome