Paco, IP routing decisions are stateless. You'll need to define your problem a bit more clearly (for yourself). Once you understand exactly what you are trying to do (why you are splitting the traffic this way) you'll be able to answer the question you pose. If you wish to look at some simple examples of split access, see my chapter on advanced routing: http://plorf.net/linux-ip/html/adv-routing.htm For outbound split access (or inbound), see these sections in particular. http://plorf.net/linux-ip/html/adv-routing.htm#ADV-MULTI-INTERNET-OUTBOUND http://plorf.net/linux-ip/html/adv-routing.htm#ADV-MULTI-INTERNET-INBOUND It doesn't sound like you wish to use a multipath route, but if you do, you should probably read the LARTC docs on load sharing split access: http://lartc.org/howto/lartc.rpdb.multiple-links.html Good luck, -Martin : Hello, : : Sorry if this question is very common, but I searched the : maillist archive and didn't found an answer... : : I have a linux box with 3 interfaces, 2 of them have public IPs : (eth1 and eth2), and the third is a private IP (our LAN). I want to do the : following: if a packet is coming from eth1, it must be forwarded to eth0, : and when it comes back, it must be routed to eth1. In case of packet comes : from eth2, it must be forwarded to eth0, and the respose must be routed to : eth2. In other words, a packet must leave our network by the interface it : come. : : I tried several combinations of iptables, 'ip rule' and 'ip : route', but it didn't work... : : I appreciate any help, thanks :) : : -- Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/