iptables rules do not affect packet routing. However,
iptables can be used to "mark" packets of a certain kind, and it is possible to route packets based on these "marks".
What you want to do is called
policy routing, and you need to have the
iproute2 tools installed to be able to do it. Basically, you will need to do this:
- create one or more alternative routing tables with the ip route add table command
- create iptables rules that match certain types of packets and "mark" them using the MARK target
- create at least one rule with the ip rule add command to direct marked packets to a certain routing table
Are you using your Linux system as a router, or do you want to do this just for local traffic from the Linux PC?