From owner-freebsd-questions@FreeBSD.ORG Tue Jun 15 20:30:11 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 0E1B616A4CE for ; Tue, 15 Jun 2004 20:30:11 +0000 (GMT) Received: from frodo.otenet.gr (frodo.otenet.gr [195.170.0.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5630943D31 for ; Tue, 15 Jun 2004 20:30:10 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b233.otenet.gr [212.205.244.241]) by frodo.otenet.gr (8.12.10/8.12.10) with ESMTP id i5FKTkUL018806; Tue, 15 Jun 2004 23:29:47 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.11/8.12.11) with ESMTP id i5FKTkVU001501; Tue, 15 Jun 2004 23:29:46 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.11/8.12.11/Submit) id i5FKTk5J001500; Tue, 15 Jun 2004 23:29:46 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 15 Jun 2004 23:29:46 +0300 From: Giorgos Keramidas To: Robert Downes Message-ID: <20040615202946.GB1116@gothmog.gr> References: <40CF53FA.7070308@lineone.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40CF53FA.7070308@lineone.net> cc: freebsd-questions@freebsd.org Subject: Re: Firewall rules 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, 15 Jun 2004 20:30:11 -0000 On 2004-06-15 20:54, Robert Downes wrote: > I'm obviously missing something... > > su-2.05b# ipfw -a list > 00100 16 1144 divert 8668 ip from any to any in via rl0 > 00200 17 964 divert 8668 ip from any to any out via rl0 > 00300 0 0 check-state > 00400 32 3296 allow ip from me to me > 00500 21 1268 allow ip from 192.168.0.0/24 to any keep-state > 00600 274 25875 allow ip from 192.168.1.0/24 to any keep-state > 00700 2 96 deny log ip from any to any > 65535 4 429 deny ip from any to any > > Now, having seen plenty of examples of huge lists of rules, I'm > obviously not seeing something that is apparent to others. Perhaps. This depends on what you mean to achieve. > I've tested my network using the grc.com ShieldsUp! port probing > system. It informs me that every one of the first 1056 ports is > stealthed (i.e. does not even reply to probes). That's because the canonical behavior of a host that doesn't listen on a TCP port is to return RST replies when connection attempts are seen. You'd need something like this added to your ruleset: add 301 deny tcp from any to any established add 601 reset tcp from any to any > In fact, the only thing it complains about is the fact that my IP > replies to ICPM ping requests (though I don't understand how). I think rule 65535 should catch these, but I haven't used ipfw in a very long time and I might be mistaken. Anyway, if you are limiting ICMP replies through the net.inet.icmp.icmplim sysctl pings shouldn't be a source of trouble. > And my /var/log/security file shows that dozens of random connections > to ports 135 and 445 have been dropped. So, what am I missing? You're missing a lot of Windows viruses. Ports 135 and 445 are used by Microsoft-specific protocols (Location Service and Directory Services, respectively). What you're seeing is a lot of attempts by trojans and other viral programs trying to break into your "Windows" machine. - Giorgos