Q on ipchains

Q on ipchains

Post by Wayne Jackso » Thu, 12 Oct 2000 04:00:00



I am just curious about something I have just read after got to the LFWTK
site.

If the default policy both in and out is set to DENY, why then are rules
appended eg:
ipchains -A input -i net1 --destination-port 23 -j DENY -l

Doesn't that just add more to the processing time?  Does ipchains operate
the same as ipfilter under OpenServer/BSD?

--
Wayne Jackson

http://www.powerup.com.au/~wjackson  --  Web Development
http://www.ozemail.com.au/~wmjackson --  SCO OpenServer Installation
http://users.bigpond.net.au/warp_kez --  SCO OpenServer Cable Connectivity

 
 
 

Q on ipchains

Post by Tim Hayne » Thu, 12 Oct 2000 04:00:00


[snip]

Quote:> If the default policy both in and out is set to DENY, why then are rules
> appended eg:
> ipchains -A input -i net1 --destination-port 23 -j DENY -l

> Doesn't that just add more to the processing time?  Does ipchains operate
> the same as ipfilter under OpenServer/BSD?

Nope, and nope. When a rule matches, it stops processing.

Sometimes it's useful to have a *log* of things - otherwise how do you know
how well your firewall's performing?

~Tim
--

                                                | http://piglet.is.dreaming.org

 
 
 

Q on ipchains

Post by Cedric Blanche » Thu, 12 Oct 2000 04:00:00





Quote:> If the default policy both in and out is set to DENY, why then are rules
> appended eg:
> ipchains -A input -i net1 --destination-port 23 -j DENY -l

-l switch is used for loging packets. This command allows matching paquets
to get loged.

Quote:> Doesn't that just add more to the processing time? Does ipchains operate
> the same as ipfilter under OpenServer/BSD?

No, ipchains is a static sequential filter : when a rule match the paquet,
processing stops.
Using DENY even in a chain with DENY policy may be sometimes useful. For
example, if you want to allow a whole subnet except one host in this subnet,
you'll do it like this :
    ipchains -A input -s <banned_host> -j DENY
    ipchains -A input -s <subnet> -j ACCEPT
 
 
 

1. Newbie Qs on ipchains

I am setting up my first unix server (RH 7) as a firewall and am new to
all of this.  I downloaded the latest Linux IP Masquerade HowTo (v1.95,
Nov 14 00) and have a question about the recommended policies for the
three built-in chains.

Section 6.5 "Stronger IP Firewall (IPCHAINS) rulesets" recommends
setting the policy for the input, output, and forwarding chains to:
reject, reject, and deny, respectively.  Why not set them all one way or
the other?  It seems like setting them all to deny would be the safest,
no?  What am I missing?

Also, the man ipchain and ipfw pages are not clear (to me) about when
packets are set to the output chain vs to the forwarding chain.  What I
think I understand is if the packet originates from within the firewall
machine, it goes to the output chain; if it's from one of the protected
machines, it goes to the forwarding chain.  Is this correct?

--
Please address private email replies to bsimon at ATT dot Net.

Sent via Deja.com
http://www.deja.com/

2. Networking help for home networking

3. ipchains-save, ipchains-restore (and WINS)

4. TCL plugin for Netscape.

5. ipchains: command not found - only sometimes (ipchains newbie)

6. So, what's the real scoop on binary upgrades?

7. ipchains log analysis tool (ipchains-db.pl)

8. kde & kdm default color depth

9. Calling all ipchain geniuses - ipchain crticism welcomed!

10. IPCHAINS -F (or) IPCHAINS -F input, output, forward

11. Generating ipchains command from ipchains -L output.

12. Erasing sw - stupid qs

13. Two Debian 2.0 Qs