Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Mar 2017 08:20:05 +0000
From:      Arthur Chance <freebsd@qeng-ho.org>
To:        byrnejb@harte-lyne.ca, freebsd-questions@freebsd.org
Subject:   Re: Restaarting PF and its effects on jails and vms
Message-ID:  <f208af7c-1427-ea5e-e849-3f9055d56838@qeng-ho.org>
In-Reply-To: <d8c45fd2a689b07df63082aa04e036e7.squirrel@webmail.harte-lyne.ca>
References:  <d8c45fd2a689b07df63082aa04e036e7.squirrel@webmail.harte-lyne.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On 23/03/2017 18:29, James B. Byrne via freebsd-questions wrote:
> I am revising the pf configuration for the FreeBSD-10.3 host of a
> number of FreeBSD-11.0 BHyve instances. When I restart PF on the host
> then traffic to a number of guests gets blocked even though the
> ruleset says it should not be.
> 
> Since the incoming ports for the blocked traffic appear to be from the
> upper dynamic range I infer that this traffic is related to
> connections established before PF was restarted and are now 'orphaned'
> in consequence.  In other words, had the initial connection between
> client anf service been made while PF was already running the traffic
> being blocked following a restart would have been let through as being
> part of an established connection.
> 
> What is the recommended way of dealing with this issue when restarting
> PF, if there is one?

Don't restart pf, reload it. "service pf reload" goes to great lengths
not to interfere with existing connections whereas "service pf restart"
blows away everything before restarting.

This is fresh in my mind because I made exactly the same mistake last
week before remembering to reload. :-)

-- 
By June 1949, people had begun to realize that it was not so easy to
get a program right as had at one time appeared. It was on one of my
journeys between the EDSAC room and the punching equipment that the
realization came over me with full force that a good part of the
remainder of my life was going to be spent in finding errors in my own
programs.

	-- Maurice Wilkes



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f208af7c-1427-ea5e-e849-3f9055d56838>