LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 12-09-2004, 08:52 PM   #1
OlRoy
Member
 
Registered: Dec 2002
Posts: 306

Rep: Reputation: 86
PF: Why isn't quick the default method?


Is there a disadvantage to using quick for every rule? I don't understand why PF doesn't default to going by the first matching rule, instead of the last. Wouldn't that be more efficient instead of processing through the whole list?
 
Old 12-10-2004, 10:35 AM   #2
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
Maybe, but it wouldn't give you the flexibility that not stopping on the first matching rule gives you.

If you're used to other firewalls, setting quick on all your rules will be more what you're used to. Not having the first match be the final one is a really cool thing when you need it though.
 
Old 12-12-2004, 06:12 AM   #3
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Briefly, the main advantage of a "last match" vs. "first match" is that with last match, your default rule goes at the top of the list. In most cases this is going to be "block all". That allows you to very quickly confirm that your default rule is, indeed, "block". It's also the first rule you write when defining a new configuration, so there's less chance you'll forget it. I know that seems trivial, but anything that leads to better awareness is a good thing.

Instead of using "quick" on every rule, write your rules in order of least specific to most specific (top to bottom), that will achieve the desired effect. I use "quick" in a few of my block rules so that I don't have to place them at the bottom of my ruleset (and because they match a lot, so I want them to short-cut evaluation). That's really the only thing I use quick for.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Method Not Allowed: The requested method POST is not allowed for the URL /writedhcp.p WiWa Linux - Networking 15 01-06-2011 01:20 PM
Details about default web Browser & default Email client sudhasmyle Linux - Software 4 06-15-2006 11:45 AM
New Virtual Servers Default to Default Server Page? DigiDave Linux - Software 4 10-18-2003 03:23 AM
default logging in method jaylee Linux - General 9 06-24-2003 04:32 AM
A Different Method Bigun Linux - Networking 2 05-23-2003 05:37 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 11:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration