Using 'rdr' on outbound connections
Greg.Hennessy at nviz.net
Thu Sep 15 03:42:22 PDT 2005
> -----Original Message-----
> From: owner-freebsd-pf at freebsd.org
> [mailto:owner-freebsd-pf at freebsd.org] On Behalf Of Brian Candler
> Sent: 15 September 2005 11:15
> To: freebsd-pf at freebsd.org
> Subject: Using 'rdr' on outbound connections
> I would like to use pf to trap all locally-originated
> outbound connections to port 25 on any remote host, and
> redirect them to a local mailserver.
> I tried:
> rdr pass proto tcp from any to any port 25 -> 127.0.0.1 port 25
Try tying that rdr to the inside interface.
This for example
~ # grep -i rdr /etc/pf.conf | grep 3128
rdr pass on $Int proto tcp from $LAN to !<InsideNets> port www ->
127.0.0.1 port 3128
rdr pass on $Int proto tcp from $LAN to $Int:0 port 3128 -> 127.0.0.1 port
Works fine to redirect http transparently to squid and provide inline http
proxying when needed.
More information about the freebsd-pf