I have a machine with mutliple aliases on it. We'll say ext_if="fxp0"
(192.168.1.1) and alias_if="192.168.1.2". net_gw="192.168.1.254" is the
gateway.

There is an smtpd on $alias_if that accepts mail. However, when mail is sent
from the host, the source address of any connections is $ext_if (as to be
expected).

The following doesn't work

ext_if="fxp0"           # 192.168.1.1
alias_if="192.168.1.2"
net_gw="192.168.1.254"

pass out quick on $ext_if route-to { ($alias_if $net_gw) } \
proto tcp from any to any port 25 keep state

With that rule in place, and with tcpdump(8) running, I see no attempted
connections out of $ext_if on port 25. I assume that means the packets are
never getting out of the stack to the interface. There's also nothing on
pflog0 if I add a "log" option.  I've tried several options with "from any
to any" -- making it "from $ext_if to any," "from $alias_if to any," etc.

Am I going down the right road with this? I don't want fastroute as I do not
want to touch the routing table.

Thanks.

- Eric

Reply via email to