[RndTbl] Multiple Outgoing Interfaces Linux

Robert Keizer robert at keizer.ca
Thu Aug 23 11:31:19 CDT 2012

Hey hey,

So I've got an annoying issue. I've got a Linux machine ( ubuntu 12.04 ) 
which has 3 physical interfaces into it. Two interfaces go to separate 
ISP's and one is internal. Because one of the upstream ISP's filters 
like crazy, specific traffic ( udp port 1194 ) needs to go out the 
non-default upstream provider.

I've got that I need to use a combination of iptables with marking, and 
ip rules from iproute. I've been trying to follow this: 

Here's what I've got so far:

iptables -> mangle -> prerouting : Mark packet
ip table with default set to the alternate gateway
ip rule to match marked packet to table

I wasn't able to get the POSTROUTING rule to match.

I'm still getting traffic on the primary link, which is then getting 
firewalled and blocked before it reaches its source.

Has anyone had this issue before? Any help would be appreciated - I'm 
just banging my head against the wall.

More information about the Roundtable mailing list