Re: [LARTC] adv. routing features not working?

Linux Advanced Routing and Traffic Control

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

 



On Thu, Dec 20, 2001 at 03:17:47PM -0800, Ross Simpson wrote:
> Bert,
> 
> Here's a little diagram:

Ok - that helps a *lot*. I sometimes feel as if the esteemed readers of our
list think that we are clairvoyant!

> >                I N T E R N E T
> >                /              \
> >    -------------             -------------
> >    | 10.4.44.1 |             | 10.4.44.2 |
> >    |  lucent   |             |   speed   |
> >    -------------             -------------
> > port-fw 10.4.44.12:80     port-fw 10.4.44.11:80
> >               \               /
> >                \             /
> >                       |
> >                      eth0
> >                 --------------
> >                 | 10.4.44.11 |
> >                 | 10.4.44.12 |
> >                 |   linux    |
> >                 --------------
> 
> So basically what I want is that for packets coming in from 'speed' to use
> speed as the outgoing gateway.  Looking at incoming packets on the linux
> box, I see that when the router does port forwarding, it doesn't rewrite any
> addresses -- the packets are still from the remote client and destined for
> the linux box.

Ok. 

> The reason I had 'to' in my rule (and two IPs on the linux box) is so I
> could differentiate traffic from each router -- traffic going to 10.4.44.11
> has to be from the 10.4.44.2 router.  The 'from' address was always
> different (the remote client).

That's still the case isn't it? I think your linux box needs this:

ip rule add from 10.4.44.11 table speed
ip rule add from 10.4.44.12 table lucent

ip route add default via 10.4.44.1 dev eth0 table speed
ip route add default via 10.4.44.1 dev eth0 table lucent

Regards,

bert

-- 
http://www.PowerDNS.com          Versatile DNS Software & Services
http://www.tk                              the dot in .tk
Netherlabs BV / Rent-a-Nerd.nl           - Nerd Available -
Linux Advanced Routing & Traffic Control: http://ds9a.nl/lartc



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