Date: Thu, 15 Sep 2005 11:42:18 +0100 From: "Greg Hennessy" <Greg.Hennessy@nviz.net> To: "'Brian Candler'" <B.Candler@pobox.com>, <freebsd-pf@freebsd.org> Subject: RE: Using 'rdr' on outbound connections Message-ID: <20050915104218.54C684D@gw2.local.net> In-Reply-To: <20050915101444.GA836@uk.tiscali.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> -----Original Message----- > From: owner-freebsd-pf@freebsd.org > [mailto:owner-freebsd-pf@freebsd.org] On Behalf Of Brian Candler > Sent: 15 September 2005 11:15 > To: freebsd-pf@freebsd.org > Subject: Using 'rdr' on outbound connections > > Hello, > > 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 3128 Works fine to redirect http transparently to squid and provide inline http proxying when needed. Greg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050915104218.54C684D>