Article View: comp.sys.unix.questions
Article #1Need Firewall help - New at this
From: Matthew J. Salerno
Date: Fri, 17 Mar 2000 00:00
Date: Fri, 17 Mar 2000 00:00
77 lines
4304 bytes
4304 bytes
I have put together the following rules to use with IP Filter: v3.3.10. I am trying to secure a box that is on the internet and our local network. I want to allow internet access only to ports 21,53,80,110,443, and then I want to allow certain ports to be accessed by other internal computers. I want to allow ICMP packets to pass through if they are from 192.168.0.0/24. Currently I am having problems with the ICMP rules. Please let me know how I can solve the ICMP problem. If there is anything that I am missing or you see anything that can be improved, please let me know. I am trying to secure the system and close all possible security holes. There is only 1 nic in this box. Much appreciated, Matt Salerno #!/bin/sh # flush all rules ipf -F a ipf -f - <<EOF ############################# # begin ruleset ############################# # loopback rules pass out quick on lo0 pass in quick on lo0 # drop itsy bitsy frags block in quick proto tcp all with short block in quick proto tcp all with short # drop source routed packets block in quick on hme0 all with opt lsrr block in quick on hme0 all with opt ssrr # don't allow anyone to spoof non-routeable addresses block in quick on hme0 from 127.0.0.0/8 to any #block in quick on hme0 from 192.168.0.0/16 to any block in quick on hme0 from 172.16.0.0/12 to any block in quick on hme0 from 10.0.0.0/8 to any block out quick on hme0 from any to 127.0.0.1/8 #block out quick on hme0 from any to 192.168.0.0/16 block out quick on hme0 from any to 172.16.0.0/12 block out quick on hme0 from any to 10.0.0.0/8 # Allow access for our computers, Office and Co-Lo pass in quick on hme0 from 192.168.0.22/32 to any port = 23 pass in quick on hme0 from 192.168.0.0/24 to any port = 23 pass in quick on hme0 from 192.168.0.0/24 to any port = 25 pass in quick on hme0 from 116.218.131.0/27 to any port = 25 pass in quick on hme0 from 116.218.131.0/27 to any port = 1521 pass in quick on hme0 from 116.218.131.0/27 to any port = 7001 pass in quick on hme0 proto icmp from 192.168.0.0/24 to any icmp-type 0 pass in quick on hme0 proto icmp from 192.168.0.0/24 to any icmp-type 11 block in quick on hme0 proto icmp from any to any # Allow anonymous/internet to access our system pass in quick on hme0 proto tcp from any to any port = 21 flags S/SA pass in quick on hme0 proto tcp from any to any port = 53 flags S/SA pass in quick on hme0 proto tcp from any to any port = 80 flags S/SA pass in quick on hme0 proto tcp from any to any port = 110 flags S/SA pass in quick on hme0 proto tcp from any to any port = 443 flags S/SA # Deny all in case I forgot anything block in quick on hme0 from any to any # Let out-going traffic out and maintain state on established connections pass out on hme0 proto tcp/udp from any to any keep state pass out on hme0 proto icmp from any to any keep state ############################## # end ruleset ############################## EOF # log ipmon > /var/adm/firewall &
Technical Details
Message-ID:
<mSvA4.3451$oc.136749@news5.giganews.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1020c6,15b780b5c0887569,start X-Google-Attributes: gid1020c6,public X-Google-Thread: 11035d,15b780b5c0887569,start X-Google-Attributes: gid11035d,public X-Google-Thread: 10f717,15b780b5c0887569,start X-Google-Attributes: gid10f717,public X-Google-Thread: 10158f,15b780b5c0887569,start X-Google-Attributes: gid10158f,public X-Google-Thread: 102603,15b780b5c0887569,start X-Google-Attributes: gid102603,public From: "Matthew J. Salerno" <Msalerno@Fiera.com> Subject: Need Firewall help - New at this Date: 2000/03/17 Message-ID: <mSvA4.3451$oc.136749@news5.giganews.com> X-Deja-AN: 598877651 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Abuse-Info: Otherwise we will be unable to process your complaint properly X-Complaints-To: abuse@GigaNews.Com X-Trace: sv2-lSdU1GxT6C6NPTUmF+HCMn4zeA4FP8dFqFtMF0Bm1U4BRj+MndIgq87Ao/iqSNQI+B3BqLOV0aCZgvc!piOGHKuxtmZtY6jOZ8nIg8xAhM8Anbc= Organization: Giganews.Com - Premium News Outsourcing X-MSMail-Priority: Normal NNTP-Posting-Date: Fri, 17 Mar 2000 13:40:02 CST Reply-To: "Matthew J. Salerno" <Msalerno@Fiera.com> Newsgroups: comp.sys.unix.questions,comp.unix,comp.unix.admin,comp.unix.solaris,git.unix.solaris