I have a linux gateway. I would like to route everything to one firewall except mail which I'll like to route to another firewall. How do you redirect by destination port in iptables?
The man page mentioned a concept of 'redirect' but it doesn't sound useful.
EDIT What I was looking for:
iptables -t mangle -A PREROUTING -p tcp –dport 25 -j MARK --set-mark 1
ip rule add fwmark 1 table 10
ip route add table 10 dev That seems quite useful if you have two or more lines with different SLA's and you want to route accordingly.