From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost.localdomain (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id EE9363EA2F for ; Mon, 11 Mar 2002 07:29:33 -0500 (EST) Received: from lacrosse.corp.redhat.com (IDENT:root@lacrosse.corp.redhat.com [172.16.52.154]) by localhost.localdomain (8.11.6/8.11.6) with ESMTP id g2BCTX503332 for ; Mon, 11 Mar 2002 07:29:33 -0500 Received: (from mail@localhost) by lacrosse.corp.redhat.com (8.11.6/8.9.3) id g2BCTXU19473 for axp-list@listman.redhat.com; Mon, 11 Mar 2002 07:29:33 -0500 Received: from localhost.localdomain (int-mx1.corp.redhat.com [172.16.52.254]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id g2BCTXR19469 for ; Mon, 11 Mar 2002 07:29:33 -0500 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by localhost.localdomain (8.11.6/8.11.6) with SMTP id g2BCTW503328 for ; Mon, 11 Mar 2002 07:29:33 -0500 Received: from mtiwmhc23.worldnet.att.net (mtiwmhc23.worldnet.att.net [204.127.131.48]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g2BCSDb11418 for ; Mon, 11 Mar 2002 07:28:13 -0500 Received: from there ([12.86.229.166]) by mtiwmhc23.worldnet.att.net (InterMail vM.4.01.03.27 201-229-121-127-20010626) with SMTP id <20020311122927.ZENM8816.mtiwmhc23.worldnet.att.net@there> for ; Mon, 11 Mar 2002 12:29:27 +0000 Content-Type: text/plain; charset="iso-8859-1" From: Mark Arrasmith To: axp-list@redhat.com Subject: Re: firewall for linux Date: Mon, 11 Mar 2002 06:23:49 -0600 X-Mailer: KMail [version 1.3.1] References: <000901c1c8da$e8134fd0$559f82c2@ted> In-Reply-To: <000901c1c8da$e8134fd0$559f82c2@ted> Organization: WSU Mathematics MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20020311122927.ZENM8816.mtiwmhc23.worldnet.att.net@there> X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: On Monday 11 March 2002 02:57 am, you wrote: > Hello, > What s the best firewall for linux 6.2. > Any recommendations ?? and if possible send me > the HOW-TO for implementation. Create the file /etc/sysconfig/ipchains either with your own script or using something like lokkit ( http://www.linux.org.uk/apps/lokkit.shtml ) Here is an example that allows access to ssh (port 22) from anywhere, loopbacks, and dns lookups, but blocks pretty much everything else. Replace dns addresses with the IP's of the DNS machines you use. :input ACCEPT :forward ACCEPT :output ACCEPT #this allows ssh, port 22, to get through -A input -s 0/0 -d 0/0 22 -p tcp -y -j ACCEPT #this allow lo access -A input -s 0/0 -d 0/0 -i lo -j ACCEPT #the next two are for DNS access. Replace the fake IP's with yours. -A input -s 192.168.1.1 53 -d 0/0 -p udp -j ACCEPT -A input -s 192.168.1.2 53 -d 0/0 -p udp -j ACCEPT #the next two reject everything else. -A input -s 0/0 -d 0/0 -p tcp -y -j REJECT -A input -s 0/0 -d 0/0 -p udp -j REJECT Once you have a setup you like, just run . . . /etc/rc.d/init.d/ipchains restart and add links to the proper runtime rcx.d directories. You can see the ipchains running configuration by running . . . cat /proc/net/ip_fwchains other examples: #allow ssh only from 192.168. networks . . . -A input -s 192.168.0.0/255.255.0.0 -d 0/0 22 -p tcp -y -j ACCEPT #allow http access from anywhere -A input -s 0/0 -d 0/0 80 -p tcp -y -j ACCEPT #allow all ethernet traffic on eth0 from the 192.168.12. network . . . -A input -s 192.168.12.0/255.255.255.0 -d 0/0 -i eth0 -j ACCEPT Hope this helps. Make sure you have physical access to the machine in case your rules don't allow you to access the machine remotely. - mark arrasmith