Using 'rdr' on outbound connections

Brian Candler B.Candler at pobox.com
Thu Sep 15 04:14:12 PDT 2005


On Thu, Sep 15, 2005 at 11:42:18AM +0100, Greg Hennessy wrote:
> Try tying that rdr to the inside interface. 

Well, there isn't an "inside" interface as such. This machine has one
interface, fxp0, and I'm talking about connections originating from the
local machine to the outside world. (The application is to trap SMTP output
from CGI scripts running on a webserver)

Anyway, I've just tried

rdr pass proto tcp from any to any port 25 -> 127.0.0.1 port 25
rdr pass on lo0 proto tcp from any to any port 25 -> 127.0.0.1 port 25
rdr pass on fxp0 proto tcp from any to any port 25 -> 127.0.0.1 port 25

and still no redirection takes place:

# telnet psg.com 25
Trying 147.28.0.62...
Connected to psg.com.
Escape character is '^]'.
220 psg.com ESMTP Exim 4.50 Thu, 15 Sep 2005 11:12:56 +0000

Regards,

Brian.


More information about the freebsd-pf mailing list