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; --> On 2005-09-08 16:51, Gaby vanhegan wrote: > On 8 Sep 2005, at 15:32, Stephan A. Rickauer wrote: >> Gaby ...


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

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-17-2008, 06:09 AM
=?ISO-8859-1?Q?Erik_Wikstr=F6m?=
 
Posts: n/a
Default Re: Migration to PF - some questions

On 2005-09-08 16:51, Gaby vanhegan wrote:
> On 8 Sep 2005, at 15:32, Stephan A. Rickauer wrote:
>> Gaby vanhegan wrote:
>>> $if_in="xl0"
>>> $if_out="xl1"
>>> pass in on $if_in keep state
>>> pass out on $if_out keep state

>>
>> Ok, let's stick to that example. Imagine a firewall having three
>> interfaces connecting Internet, LAN and DMZ. When I would like to
>> allow SMTP traffic to my mail server in the DMZ, from LAN _and_
>> Internet, where would you filter?

>
> Just spotted a bug. The first two lines should not have the dollars
> on them:
>
> if_in="xl0"
> if_out="xl1"
>
> As to your question, much the same as a normal firewall config set,
> but the line you would want is this (assuming your mailserver runs on
> 1.2.3.4):
>
> # Put this macro at the top
> if_dmz="xl2"
>
> # Later on in the ruleset, deny everything but smtp to the DMZ
> block in on $if_dmz keep state
> pass in on $if_dmz from any to 1.2.3.4 port smtp keep state


Wouldn't that block traffic from the SMTP-server and allow traffic
from the DMZ-net to 1.2.3.4 (which should be on that net)? Should
it not be like this?

block out on $if_dmz
pass in on { $if_lan, $if_wan } from any to 1.2.3.4 port smtp keep state

My understanding is that this will first block all traffic to the DMZ-
net, and then allow traffic coming from the LAN or Internet to pass to
the server 1.2.3.4 (which should be on the DMZ). Since we use keep state
the traffic will not be blocked by rule 1. Or is it me who
missunderstood things?

--
Erik Wikstrvm

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:12 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com