From owner-freebsd-questions@FreeBSD.ORG Tue Dec 23 11:42:38 2003 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 E135016A4CE for ; Tue, 23 Dec 2003 11:42:38 -0800 (PST) Received: from catseye.mine.nu (d207-81-17-215.bchsia.telus.net [207.81.17.215]) by mx1.FreeBSD.org (Postfix) with SMTP id E636B43D2F for ; Tue, 23 Dec 2003 11:42:08 -0800 (PST) (envelope-from catseye@catseye.mine.nu) Received: (qmail 67652 invoked by uid 1001); 23 Dec 2003 19:45:44 -0000 Date: Tue, 23 Dec 2003 11:45:44 -0800 From: Chris Pressey To: Dave McCammon Message-Id: <20031223114544.73cd41b2.cpressey@catseye.mine.nu> In-Reply-To: <20031223161953.18632.qmail@web41414.mail.yahoo.com> References: <20031223161953.18632.qmail@web41414.mail.yahoo.com> Organization: Cat's Eye Technologies X-Mailer: Sylpheed version 0.9.8a (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: questions@freebsd.org Subject: Re: grep, netstat, and bridging 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: Tue, 23 Dec 2003 19:42:39 -0000 On Tue, 23 Dec 2003 08:19:53 -0800 (PST) Dave McCammon wrote: > I this a feature, bug, or just some logical thing that > grep does( or perhaps netstat)? > > Scenario: > > IP addresses > comp1=xx.xx.xx.1 > comp2=xx.xx.xx.6 > comp3=xx.xx.xx.12 > > comp1 and comp3 run FBSD 4.9 stable > comp2 runs FBSD 5.1-RELEASE > > comp1 is a bridging firewall using ipfw > > A: comp2# netstat -n |grep xx.xx.xx.1 > > tcp4 0 0 xx.xx.xx.6.54953 xx.xx.xx.12.3551 TIME_WAIT > tcp4 0 0 xx.xx.xx.6.54952 xx.xx.xx.12.3551 TIME_WAIT > tcp4 0 0 xx.xx.xx.6.22 xx.xx.xx.1.1233 > ESTABLISHED > > > B: comp2# netstat -n |grep xx.xx.xx.1. > > tcp4 0 0 xx.xx.xx.6.54954 xx.xx.xx.12.3551 TIME_WAIT > tcp4 0 0 xx.xx.xx.6.54953 xx.xx.xx.12.3551 TIME_WAIT > tcp4 0 0 xx.xx.xx.6.22 xx.xx.xx.1.1233 > ESTABLISHED > > > C: comp2# netstat -n |grep xx.xx.xx.12 > > tcp4 0 0 xx.xx.xx.6.54957 xx.xx.xx.12.3551 TIME_WAIT > tcp4 0 0 xx.xx.xx.6.54956 xx.xx.xx.12.3551 TIME_WAIT > > > Actually..I see the same output on a cygwin machine > behind the comp1 firewall. >From the grep(1) man page: The period . matches any single character. Try fgrep(1) (or grep -F) instead and see if that helps? -Chris