Link to home
Start Free TrialLog in
Avatar of xscousr
xscousrFlag for Canada

asked on

route based on incoming interface

I have two modem connections to two isp's
I also have two ip's on one interface - eth0 and eth0:1 connected to a local network

What i need to figure out is how to establish routing so that traffic coming into eth0 goes out ppp0 and traffic coming into eth0:1 goes out ppp1 (as well as their returned packets)





                                                                                                       
Avatar of Pablo Allietti
Pablo Allietti
Flag of Uruguay image

Yes.   Set the default gateway for the router to point up PPP0
link, and use iptables SNAT to set all packets to have source address ppp1
Avatar of xscousr

ASKER

squid won't solve the issue.

Not only do i have http traffic coming in i also have two sendmail servers running, each masqing and using it's isp's mailserver as a smart host, one on each eth. With this each incoming needs to go out vi it's assigned ppp connection so that it will be coming from within the isp's block and be accepted by their mail server.

so
                25
 ------->| eth0    | --------->ppp0 ---------> Internet
              | 80      |
              |           |
              |  26     |
 ------->| eth0:1 | --------->ppp1 ---------> Internet
                 8080  
ASKER CERTIFIED SOLUTION
Avatar of de2Zotjes
de2Zotjes
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xscousr

ASKER

thanks de2Zotjes