From owner-freebsd-questions@FreeBSD.ORG Wed Nov 30 19:10:22 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0CAD106566B for ; Wed, 30 Nov 2011 19:10:22 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 583DB8FC0A for ; Wed, 30 Nov 2011 19:10:19 +0000 (UTC) Received: by eaai12 with SMTP id i12so1556802eaa.13 for ; Wed, 30 Nov 2011 11:10:19 -0800 (PST) Received: by 10.14.8.143 with SMTP id 15mr475483eer.56.1322680218921; Wed, 30 Nov 2011 11:10:18 -0800 (PST) Received: from [10.33.169.52] ([92.90.20.9]) by mx.google.com with ESMTPS id z58sm9144417eea.3.2011.11.30.11.10.16 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 30 Nov 2011 11:10:17 -0800 (PST) References: <4ED65E89.3080208@msen.com> In-Reply-To: <4ED65E89.3080208@msen.com> Mime-Version: 1.0 (iPhone Mail 8J2) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <69313081-6D4F-45D3-88E7-8F80611B3FF8@my.gd> X-Mailer: iPhone Mail (8J2) From: Damien Fleuriot Date: Wed, 30 Nov 2011 20:10:04 +0100 To: Mark Moellering Cc: FreeBSD Subject: Re: pf rdr (redirect) syntax solved 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: Wed, 30 Nov 2011 19:10:22 -0000 On 30 Nov 2011, at 17:49, Mark Moellering wrote: > My apologies for posting an answer without a question but this is somethin= g I want searchable in the future. > To use redirection ( rdr ) in pf, you MUST specify an ip address or interf= ace. > For example, if you want to force external traffic coming in on port 80 to= port 443 and write this; >=20 > rdr on $interface inet proto tcp from ! $internal_addresses to $interface p= ort 80 -> port 443 >=20 > it FAILS! The PROPER syntax is; >=20 > rdr on $interface inet proto tcp from ! $internal_addresses to $interface p= ort 80 -> $interface port 443 >=20 > I hope this helps someone... >=20 > Mark Moellering >=20 Do not take this personally but I find it exceedingly disturbing that you sh= ould use the ml as a documentation storage space. You really should store this kind of information internally, such as a comme= nt in your pf.conf and/or a wiki. Additionally, you may find the correct syntax for rdr rules in man pf.conf, s= o you'll always have an example handy.=