On Mon, Mar 10, 2003 at 01:59:52PM -0500, Aldo S. Lagana wrote: > How do I (using iproute2, etc.) get one linux gateway to forward packets > to another linux gateway based on port? The simplest solution would be maybe fwmark: # Mark all 80/tcp traffic with 0x42 iptables -t mangle -A PREROUTING -p tcp --dport 80 -j MARK --set-mark 0x42 # Create new routingtable with new default-route where $NEW_GW is IP of # gateway ip route add default via $NEW_GW table 42 # Now force marked traffic to use this brandnew routingtable ip rule add fwmark 0x42 lookup table 0x42 > I just want to do policy based routing by port to another router. I've > read the Advanced Routing HOWTO and I cannot find the answer there - > please someone enlighten me! Hope this illuminates you :) Alex. -- "Mr Data, when I said 'Fire at Will', I didn't mean for you to be so literal." Instructions for use of this post: Insert tounge in cheek. Read as normal.
Attachment:
pgp00369.pgp
Description: PGP signature