I need to send the packets of specific port to different gateway. This is the situation:
The server has different services, like http, dns, and mail (smtp,pop,imap), and it has two gateways.
eth2: Gateway1 (Default gw)
ppp0: Gateway2
All the services run ok on the default gw (eth2), but I need to send all the packets that the server generate to send email (dest port 25) to go out to the Gateway2 (ppp0).
It isn“t possible with prerouting because there are packets that are locally generated.