On 2007/01/28 13:03, Soner Tari wrote:
> I'm running Postfix on OpenBSD and have multiple external links on the
> same box. I want outgoing smtp connections to be routed to ext_if2, but
> the rest to ext_if1. To achieve this, default route being ext_if1, I
> tried a couple of things:
>
> pass out log quick route-to ($ext_if2 $ext_gw2) \
>    proto tcp to any port smtp user _postfix keep state

if that's all you have, run tcpdump on $ext_if2 and you'll see packets
going out with $ext_if1's source address because you're missing the nat
rule to go with it.

route-to/reply-to just change the routing, not the src/dest addresses.

> In short, I need something like destination-port-based routing for
> multiple links. The situation is not specific to smtp port or Postfix,
> I'd like to achieve the same for any port I wish.

works perfectly.

Reply via email to