Bacula File/Storage Connection Woes using PF

Dalibor Gudzic dalibor.gudzic at gmail.com
Wed Mar 26 08:02:06 PDT 2008


On Wed, Mar 26, 2008 at 3:53 AM, Jeremy Chadwick <koitsu at freebsd.org> wrote:

> I'll try to explain it with a very small ruleset and a couple scenarios:
>
>  $ext_if = network interface that's got a public IP address
>  4.4.4.4 = our public IP address
>
>  pass out quick all flags S/SA keep state
>  pass out quick all
>  block in log all
>  pass in quick on $ext_if inet proto tcp from any to 4.4.4.4 port ssh
>
> Two scenarios:
>
> 1) When an incoming TCP packet from <any> to 4.4.4.4 on port 22 is seen,
> that incoming packet is permitted (rule #4).  Outbound responses from
> 4.4.4.4 to <whoever sent the original incoming packet> are also
> permitted (rule #1).  Note the "keep state".
>
>
>
Correct me if I'm wrong, but I think the outbound packet will be matched
against the #2 rule, as the rule #1 has "flags S/SA" and will not match the
packet since the packet would have "ACK" flag set. Thus, the state will not
be created in state table.

That is if the rule #4 doesn't include "keep state" (which is default in
RELENG_7).


More information about the freebsd-pf mailing list