[Gllug] routing via a second external IP
C. Cooke
ccooke-gllug at gkhs.net
Tue Aug 12 17:36:34 UTC 2008
On Tue, Aug 12, 2008 at 01:05:49PM +0100, John Winters wrote:
> C. Cooke wrote:
> [snip]
> > This is why using iptables and a separate routing table is a better
> > solution - it's transparent to the end-user. You just select which
> > traffic you'd like to travel down the second line.
>
> How does this cause the incoming half of the traffic to travel down the
> second line?
>
Routing this way requires three parts:
1) A set of iptables rules which mark traffic that you want to treat
specially
2) An iproute2 rule that says traffic with a particular mark should use
a different (named) routing table to the default
3) A named routing table for that type of traffic.
Parts two and three are very simple. Part one is more complex, but still
pretty easy.
<five hours later>
... I've tried three times to make the time to actually flesh this out
a bit and failed. I'll try again tomorrow.
--
for((P=10**8,Q=P/100,X=320*Q/(`tput cols`-1),Y=210*Q/`tput lines`,y=-105*Q,v=-2\
20*Q,x=v;y<105*Q;x=v,y+=Y));do for((;x<P;a=b=i=k=c=0,x+=X));do for((;a*a+b*b<2*\
P*P&&i++<99;a=((c=a)*a-b*b)/P+x,b=2*c*b/P+y));do :;done;(((j=(i<99?i%16:0)+30)>\
37?k=1,j-=8:0));echo -ne "\E[$k;$j"mE;done;echo -e \\E[0m;done # Charles Cooke
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list