Unix Technical Forum

Re: Migration to PF - some questions

This is a discussion on Re: Migration to PF - some questions within the lucky.openbsd.misc forums, part of the OpenBSD category; --> Stephan A. Rickauer wrote: > Gaby vanhegan wrote: > >> Yes, correct, my bad... Or perhaps this would work ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > lucky.openbsd.misc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-17-2008, 07:10 AM
Guido Tschakert
 
Posts: n/a
Default Re: Migration to PF - some questions

Stephan A. Rickauer wrote:
> Gaby vanhegan wrote:
>
>> Yes, correct, my bad... Or perhaps this would work also:
>>
>> block out on $if_dmz keep state
>> pass out on $if_dmz from {$if_lan, $if_inet} to 1.2.3.4 port smtp
>> keep state
>>
>> Maybe that was what I intended to write...

>
>
> Ok, I am now playing with 'fwbuilder' to see how the generated pf rules
> look like. Presumably, they won't be structured as efficiently as if one
> writes them by hand - but managing hundreds of rules manually is a
> nightmare ...
>
> Thanks so far,
>

Hello,

I think you know the following, but nevertheless its important if you
port your rules from netfilter to pf.

In netfilter nat and filter rules are checked with:
first match wins.

In pf nat rules also the first match wins

__but__

in pf filter rules the __last__ match wins.

In fact that is the one thing I don't like in pf, but to have a "first
match win" you can use the magic word quick in all your pass and block
rules. (e.g "pass in quick")

guido

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:26 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com