From owner-freebsd-questions@FreeBSD.ORG Sat Apr 28 05:32:22 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6963E16A400 for ; Sat, 28 Apr 2007 05:32:22 +0000 (UTC) (envelope-from wilfre@mail.ru) Received: from mx28.mail.ru (mx28.mail.ru [194.67.23.67]) by mx1.freebsd.org (Postfix) with ESMTP id 2BA3613C455 for ; Sat, 28 Apr 2007 05:32:22 +0000 (UTC) (envelope-from wilfre@mail.ru) Received: from mx2.mail.ru (mx2-2.mail.ru [194.67.23.122]) by mx28.mail.ru (mPOP.Fallback_MX) with ESMTP id 093A16E9722 for ; Sat, 28 Apr 2007 08:47:04 +0400 (MSD) Received: from [213.234.3.130] (port=19053 helo=[192.168.200.254]) by mx2.mail.ru with asmtp id 1Hhepp-000GT3-00 for freebsd-questions@freebsd.org; Sat, 28 Apr 2007 08:47:02 +0400 Message-ID: <4632D1C4.5000809@mail.ru> Date: Sat, 28 Apr 2007 08:47:00 +0400 From: "Andrey V. Semyonov" User-Agent: Thunderbird 1.5.0.5 (X11/20060814) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <5855700c0704261135m7ddc06dbuc74e501e9bef3ca1@mail.gmail.com> In-Reply-To: <5855700c0704261135m7ddc06dbuc74e501e9bef3ca1@mail.gmail.com> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: PF NAt X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2007 05:32:22 -0000 > /etc/pf.conf > > exter_if = "vr0" ^^^ > nat on $exter_if from $inter_if to any -> $exter_if ^^^^^^^^^ Now look at man page about nat/rdr rule syntax: nat-rule = [ "no" ] "nat" [ "pass" ] [ "on" ifspec ] [ af ] [ protospec ] hosts [ "tag" string ] [ "tagged" string ] [ "->" ( redirhost | "{" redirhost-list "}" ) [ portspec ] [ pooltype ] [ "static-port" ] ] Grammar says, that after the "->" keyword there should be specified _host(s)_. So, if you want to use a macro, pointing to your interface _name_, there's a technique to translate it to it's primary or any aliased IP: ($macro) Your line should look like this: nat on $exter_if from $inter_if to any -> ($exter_if)