Date: Wed, 26 Mar 2008 16:02:02 +0100 From: "Dalibor Gudzic" <dalibor.gudzic@gmail.com> To: "Jeremy Chadwick" <koitsu@freebsd.org> Cc: Greg Hennessy <Greg.Hennessy@nviz.net>, freebsd-pf@freebsd.org Subject: Re: Bacula File/Storage Connection Woes using PF Message-ID: <866fa9520803260802v3686b24dq1ee7aa1cc4b35f75@mail.gmail.com> In-Reply-To: <20080326025316.GA68607@eos.sc1.parodius.com> References: <9DE6EC5B5CF8C84281AE3D7454376A0D6D0290@cetus.dawnsign.com> <20080326025316.GA68607@eos.sc1.parodius.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 26, 2008 at 3:53 AM, Jeremy Chadwick <koitsu@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).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?866fa9520803260802v3686b24dq1ee7aa1cc4b35f75>