From owner-freebsd-stable@FreeBSD.ORG Mon Oct 31 14:30:12 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D09D106564A for ; Mon, 31 Oct 2011 14:30:12 +0000 (UTC) (envelope-from andrej@antiszoc.hu) Received: from mail.deployis.eu (mail.deployis.eu [217.20.135.253]) by mx1.freebsd.org (Postfix) with ESMTP id A00568FC13 for ; Mon, 31 Oct 2011 14:30:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=antiszoc.hu; s=default; h=Subject:To:From:Date; bh=1U6KCyeV3/1MmpIgxDHeDSEHtI2jGfOPhz3+ZzZQzRA=; b=nHrvQSVRrFZz/JYpanpP/8Ml5ZFLbJnnIQ+F6hmoyxcTzu0QlPgThH24oVHyYY1qmrkdef4eamRa0W6cWZHQG+5S0lMVf0Zcj+9j6aR58e8jGuYhAL1DAR+y/CrEqotV; Received: from localhost ([127.0.0.1]:56230 helo=mail.deployis.eu) by mail.deployis.eu with esmtp (Exim 4.71 #1 (Debian)) id 1RKssH-0008IM-UL from for ; Mon, 31 Oct 2011 15:30:06 +0100 Received: from pool-232-195.ippark.hu ([31.223.232.195]) by mail.deployis.eu with HTTP (HTTP/1.1 POST); Mon, 31 Oct 2011 15:30:05 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 31 Oct 2011 15:30:05 +0100 From: =?UTF-8?Q?G=C3=B3t_Andr=C3=A1s?= To: In-Reply-To: <4EAE6538.4030001@my.gd> References: <4EAE6538.4030001@my.gd> Message-ID: X-Sender: andrej@antiszoc.hu User-Agent: RoundCube Webmail/0.2.1 X-DKIM-Status: None (from 127.0.0.1) X-Mail-Status-postahivatal: trustedmail (from 127.0.0.1) X-Spam-Score-postahivatal: -47 Subject: Re: pf rdr rule question - corrected X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2011 14:30:12 -0000 On Mon, 31 Oct 2011 10:07:04 +0100, Damien Fleuriot wrote: > On 10/31/11 12:04 AM, Gót András wrote: >> Dear All, >> >> I'd like to have the following ruleset, for pure-ftpd passive port >> range: >> >> (pasv and past mistyping corrected) >> >> --- >> ftp_pasv_start="X" >> ftp_pasv_end="Y" >> >> rdr on $netif inet proto tcp from any to $internalip port >> $ftp_pasv_start:$ftp_pasv_end -> $internalip >> >> pass in quick on $netif proto tcp from any to $internalip port >> $ftp_pasv_start >< $ftp_pasv_end keep state flags S/SA >> > > pass in quick on $netif proto tcp from any to $internalip port > $ftp_pasv_start:$ftp_pasv_end > > > Both keep state and flags S/SA are default, you don't need to write > them. My problem is with the rdr rule, that the second macro won't get evaluated correctly. I just copied the stateful match rule, to make it more clear that with a pair of macros it's easier to set up. FreeBSD version is 8.2. Regards, Andras