All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] routing to 2 different Internet connections
@ 2002-09-09 15:19 Rimas
  2002-09-09 15:31 ` Martin A. Brown
  2002-09-10 10:39 ` Rimas
  0 siblings, 2 replies; 3+ messages in thread
From: Rimas @ 2002-09-09 15:19 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 414 bytes --]

Hi folks,

I have iptables rules:
iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
iptables -A POSTROUTING -t nat -o eth2 -j MASQUERADE
That will masquerade all packets going out of the two external interfaces.

How to make a routing with iproute2 to direct packets from 
10.105.105.100-105 via eth0 and to direct packets from the rest of and
10.105.105.0/24 via eth2 ?

Thanks in advance

Rimas

[-- Attachment #2: Type: text/html, Size: 1111 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] routing to 2 different Internet connections
  2002-09-09 15:19 [LARTC] routing to 2 different Internet connections Rimas
@ 2002-09-09 15:31 ` Martin A. Brown
  2002-09-10 10:39 ` Rimas
  1 sibling, 0 replies; 3+ messages in thread
From: Martin A. Brown @ 2002-09-09 15:31 UTC (permalink / raw)
  To: lartc

Rimas,

This pseudo-code may not be the correct solution for you, but it should 
help you get on the right track...there is documentation out there to help 
you figure out what you need to do--good luck!

# -- are you following the LARTC two-link howto?
#    http://lartc.org/howto/lartc.rpdb.multiple-links.html#AEN261
#    make sure you set up default routes in two separate routing tables

ip route add default via $ETH0_GW table eth0.link
ip route add default via $ETH2_GW table eth2.link

# -- add rules to the RPDB in order from most general to most specific
#    

ip rule add from 10.105.105.0/24 table eth2.link

ip rule add from 10.105.105.100 table eth0.link
ip rule add from 10.105.105.101 table eth0.link
ip rule add from 10.105.105.102 table eth0.link
ip rule add from 10.105.105.103 table eth0.link
ip rule add from 10.105.105.104 table eth0.link
ip rule add from 10.105.105.105 table eth0.link

As I mentioned above, Rimas, you'll want to look at the split access howto 
of the LARTC HOWTO.  If that's not enough to make sense of it, you'll need 
to refer to the iproute2 manual, which is available as HTML here:

  http://defiant.coinet.com/iproute2/ip-cref/

Post to the list with more specific questions if you have them....and 
hopefully somebody else with a more elegant solution will post in the 
interim.

Ciao for now,

-Martin

 : Hi folks,
 : 
 : I have iptables rules:
 : iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
 : iptables -A POSTROUTING -t nat -o eth2 -j MASQUERADE
 : That will masquerade all packets going out of the two external interfaces.
 : 
 : How to make a routing with iproute2 to direct packets from 
 : 10.105.105.100-105 via eth0 and to direct packets from the rest of and
 : 10.105.105.0/24 via eth2 ?
 : 
 : Thanks in advance
 : 
 : Rimas
 : 

-- 
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [LARTC] routing to 2 different Internet connections
  2002-09-09 15:19 [LARTC] routing to 2 different Internet connections Rimas
  2002-09-09 15:31 ` Martin A. Brown
@ 2002-09-10 10:39 ` Rimas
  1 sibling, 0 replies; 3+ messages in thread
From: Rimas @ 2002-09-10 10:39 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 414 bytes --]

Hi folks,

I have iptables rules:
iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
iptables -A POSTROUTING -t nat -o eth2 -j MASQUERADE
That will masquerade all packets going out of the two external interfaces.

How to make a routing with iproute2 to direct packets from 
10.105.105.100-105 via eth0 and to direct packets from the rest of and
10.105.105.0/24 via eth2 ?

Thanks in advance

Rimas

[-- Attachment #2: Type: text/html, Size: 1155 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-09-10 10:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-09 15:19 [LARTC] routing to 2 different Internet connections Rimas
2002-09-09 15:31 ` Martin A. Brown
2002-09-10 10:39 ` Rimas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.