multiple links and nat
Witaj Edmundo,
W Twoim liœcie datowanym 5 stycznia 2006 (17:21:52) mo¿na przeczytaæ:
Please consult: http://www.ssi.bg/~ja/#routes and my example scpript mpath2.sh published there.
Without those patches - it just doesn't work :)
Quoted 59 lines
The problem (as usual) is the change of route the routing box is doing for connections already stablished.
Maybe you can try using separate routing tablewith a single internet link for ssh (policy routing).
Quoted 41 lines · seph
Hi, this might be a dumb question, but I'm not finding much information online.
I'm trying to setup a 2.6 linux box to run nat across multiple upstream links as a simple way to aggregate bandwidth. I found the instructions in lartc section 4.2
(http://lartc.org/howto/lartc.rpdb.multiple-links.html) fairly clear and straightforward. I implemented those, and a couple of trivial iptables commands and tried it.Persistent masqueraded connections (like ssh) weren't very happy. The frequently hung, and I saw the "MASQUERADE: Route sent us somewhere else." error. googling for that, I see lots of suggestions to use connmark, but no examples of how connmark and the multiple link stuff interact. Does anyone have a pointer?
The rules I'm using are roughly:
/sbin/iproute addP1_NETdev IF1 src IP1 table 201/sbin/iproute add default via P1 table 201/sbin/iproute addP1_NETdev IF1 src IP1/sbin/iproute add 127.0.0.0/8 dev lo table 201/sbin/iprule add from IP1 table 201/sbin/iproute addP2_NETdev IF2 src IP2 table 202/sbin/iproute add default via P2 table 202/sbin/iproute addP2_NETdev IF2 src IP2/sbin/iproute add 127.0.0.0/8 dev lo table 202/sbin/iprule add from IP2 table 202
/sbin/iproute del default/sbin/iproute add default scope global nexthop via P1 dev IF1 weight 1 nexthop via P2 dev IF2 weight 4/sbin/iproute flush cache
/sbin/iptables-t nat -A PREROUTING -s LOCALNET -dP1_NET-j ACCEPT/sbin/iptables-t nat -A PREROUTING -s LOCALNET -dP2_NET-j ACCEPT/sbin/iptables-t nat -A POSTROUTING -o IF1 -s LOCALNET -j MASQUERADE/sbin/iptables-t nat -A POSTROUTING -o IF2 -s LOCALNET -j MASQUERADEQuoted 7 lines
thanks
seph
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Signature · 7 lines
Pozdrowienia, Robert Kurjata _______________________________________________ LARTC mailing list [email protected] http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc