Re: [LARTC] Multiple Default Gateways

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello David,

 : Is there an easy way to get certain types of traffic (e.g. sport 25) to
 : be routed over a certain ADSL connection?

Yes.

 : I'm currently able to get all Proxy browsing to go via the ADSL
 : connection by replacing the tcp_outgoing_address and
 : udp_outgoing_address in squid.conf with the ADSL's current IP and
 : restarting the proxy server...
 :
 : I would really like to be able to make certain types of traffic to go
 : via different links...

Try something like this:

iptables -t mangle -A PREROUTING -p tcp --dport 25 -j MARK --set-mark 4
ip rule add fwmark 4 table ADSL

You may need something like this as well in your ip-up script:

iptables -t mangle -A POSTROUTING -p tcp --dport 25 -j SNAT --to-source $4

  (Note $4 is the current dynamic IP handed to us by pppd.)

This may not be everything you need, so please also consult my
linux-ip.net documentation.

  http://linux-ip.net/html/adv-multi-internet.html
  http://linux-ip.net/html/adv-multi-internet.html#adv-multi-internet-outbound

Best of luck,

-Martin

-- 
Martin A. Brown --- SecurePipe, Inc. --- mabrown@xxxxxxxxxxxxxx



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux