From owner-freebsd-questions@FreeBSD.ORG Wed Mar 3 17:16:04 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 A4F6A16A4CE for ; Wed, 3 Mar 2004 17:16:04 -0800 (PST) Received: from gateway.home.ricin.net (cp464173-a.dbsch1.nb.home.nl [212.204.145.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6402B43D1F for ; Wed, 3 Mar 2004 17:16:04 -0800 (PST) (envelope-from danny@ricin.com) Received: from workstation.home.ricin.net (workstation.home.ricin.net [172.16.32.66]) by gateway.home.ricin.net (Postfix) with ESMTP id 7F21724D09 for ; Thu, 4 Mar 2004 02:16:03 +0100 (CET) From: Danny Pansters To: freebsd-questions@freebsd.org Date: Thu, 4 Mar 2004 02:16:03 +0100 User-Agent: KMail/1.6 References: <40467B85.9070302@shaw.ca> In-Reply-To: <40467B85.9070302@shaw.ca> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200403040216.03105.danny@ricin.com> Subject: Re: ipfw rules X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: danny@ricin.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2004 01:16:04 -0000 On Thursday 04 March 2004 01:42, RYAN vAN GINNEKEN wrote: > I know this has probably been posted 1000's of times but i would like to > set up a ipfw firewall i run many services on this machine. It acts as a > gateway for my network > APACHE web server 80/TCP and perhaps 443/TCP > IMAP mail server 143/TCP > SMTP mail server 25/TCP > BIND name server 53/UDP for xfers 53/TCP > FTP server 21/TCP 20/TCP maybe (I use ipf but the principles are the same) - block in/out packages you never want to see at all (e.g. with weird opts or too short to be normal) - block in anything from your own IP - block in anything from private addresses (you can get and update lists of these) - let no broadcasting packets come in or go out even on wrong bcast addresses - block in (and log) everything else except: - your services on their ports keep state and with proxy if needed (ftp?) - let everything outward go and keep state or: - let nothing out except what you may initialize (and keep state) e.g. web traffic, mail retrieval, etc. More cumbersome. - decide on ping etc, what do you want to come in and what ICMP do you want to respond to - send out resets rather than ICMP-no-answer or whatever it's called on blocked ports Keep huge big logs at first, then later strip out what you know means no harm. I don't know about VNC. HTH, Dan