From owner-freebsd-questions@freebsd.org Wed May 18 08:23:39 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4AAEB40F4D; Wed, 18 May 2016 08:23:39 +0000 (UTC) (envelope-from stdin@niklaas.eu) Received: from box-fra-01.niklaas.eu (box-fra-01.niklaas.eu [IPv6:2a00:c98:2200:af07:6::1]) by mx1.freebsd.org (Postfix) with ESMTP id 9298B172A; Wed, 18 May 2016 08:23:39 +0000 (UTC) (envelope-from stdin@niklaas.eu) Received: by box-fra-01.niklaas.eu (Postfix, from userid 1001) id 0B71861FE5; Wed, 18 May 2016 10:23:32 +0200 (CEST) Date: Wed, 18 May 2016 10:23:32 +0200 From: Niklaas Baudet von Gersdorff To: freebsd-pf@freebsd.org, freebsd-questions@freebsd.org Subject: Re: `echo | pfctl -mf -` overriding instead of modifying Message-ID: <20160518082331.GE99839@box-fra-01.niklaas.eu> Mail-Followup-To: freebsd-pf@freebsd.org, freebsd-questions@freebsd.org References: <20160518072409.GD99839@box-fra-01.niklaas.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2016 08:23:39 -0000 Dewayne Geraghty [2016-05-18 17:46 +1000] : > Niklaus, > Would you please reverse the order and advise? That is try: > exec.poststart += "echo 'rdr pass on vtnet0 inet6 proto { udp tcp } to > vtnet0 port domain -> $private_ip6' | pfctl -a 'jails/$name' -mf -"; > exec.poststart += "echo 'rdr pass on vtnet0 inet proto { udp tcp } to > vtnet0 port domain -> $private_ip4' | pfctl -a 'jails/$name' -f -"; If I reverse th order, it is only the last redirect that is applied (in this case inet). The same things happen if I use `-mf -` for the second entry in the example above. Niklaas