Just use 'flags S keep state' on both rules. You might want to consider
restricting tha flows to and from your box, rather than any.
pass in quick on dc0 proto tcp from any to [your_box_ip] port = 22 flags S keep state
pass out quick on dc0 proto tcp from [your_box_ip] to any port = 22 flags S keep state
On Thu, 16 Oct 2003, Toomas Aas wrote:
> Hi!
>
> > Hi all. I would like to allow ssh in and out of my
> > box, without using state rules.
> >
> > Here's what I've got:
> > ...
> > pass in quick on dc0 proto tcp from any to any port =
> > 22
> > ...
> > pass out quick on dc0 proto tcp from any to any port =
> > 22
> > ...
> > block in log on dc0
> > block out log on dc0
> > ...
> >
> > When I try to ssh out from the box (FreeBSD 5-1) I get
> > The replies from outside server blocked
> > (flags=SA,catches on "block in log on dc0")
>
> That's not surprising, because there is no rule that allows the
> response packets from remote server's port 22 to enter your system.
>
> > If I try to ssh into the system, the replies get
> > blocked going back out the interface
> > ("flags=SA,catches on "block out log on dc0")
>
> Similarly, there is no rule that allows the response packets from your
> server's port 22 to go out to the client.
>
> --
> Toomas Aas | [EMAIL PROTECTED] | http://www.raad.tartu.ee/~toomas/
> * 24 hours in a day, 24 beers in a case. Coincidence?
>
>
>