Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Nov 2011 11:49:13 -0500
From:      Mark Moellering <mark@msen.com>
To:        FreeBSD <freebsd-questions@freebsd.org>
Subject:   pf rdr (redirect) syntax solved
Message-ID:  <4ED65E89.3080208@msen.com>

next in thread | raw e-mail | index | archive | help
My apologies for posting an answer without a question but this is 
something I want searchable in the future.
To use redirection ( rdr ) in pf, you MUST specify an ip address or 
interface.
For example, if you want to force external traffic coming in on port 80 
to port 443 and write this;

rdr on $interface inet proto tcp from ! $internal_addresses to 
$interface port 80 -> port 443

it FAILS!  The PROPER syntax is;

rdr on $interface inet proto tcp from ! $internal_addresses to 
$interface port 80 -> $interface port 443

I hope this helps someone...

Mark Moellering



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ED65E89.3080208>