Quote:> > I've been investigating advanced routing and I'm recompiling my kernel.
> > I selected the policy routing[1] which should let me create 2 routing
> > tables, and select which table to use based on incoming interface. That
> > should do the trick, I hope :) Lot's more learning to go, I love it!
> :) I did it! lol. Here's the story:
> Recompiled 2.2.16 + LIDS patch selecting advanced routing and policy
> routing. Installed iproute-2.2.4-2.i386.rpm package. Read and followed
> http://www.compendium.com.ar/policy-routing.txt
> Nightmare! Kept getting 'RTNETLINK answers: Operation not permitted'
> using the ip utility and I couldn't find that string anywhere on
> dejanews.com or altavista.com, so I figured I had some rare glitch or
> something, whatever, perfect time to upgrade to 2.4.0test9 ;)
> Upgraded the kernel and selected the same advanced routing settings in
> menuconfig. Reboot, now the ip util works good. Next I spent hours
> trying to figure out how to do a simple little task, nothing new for me
> though. Read through Adv-Routing HOWTO but had no luck. Next I printed
> the ip-cref.ps manual that came in the iproute rpm and read that, then
> tinkered with the ip tool again, but still no luck. Finally after
> rereading the manual I reread, no, I understood the following section:
> Section 8.1
> Arguments:
> -iif NAME
> select incoming device to match. If the interface is loopback, the
> rule matches only packets originated by this host. It means that you may
> create separate routing tables for forwarded and local packets and,
> hence, completely segregate them.
> All I wanted to do was have packets go out the interface that they came
> in on. That's it. But packets would come in on ppp0(staticIP,isp1) and
> go out eth0(DHCP,isp2), eth0 being the default gateway interface.
> I used the following ip rule and ip route commands to finally get that
> simple little task done :)
> ip route add default via 207.194.170.1 dev ppp0 table 2
> ip rule add from 207.194.170.0/24 iif lo table 2 priority 100
> The first command creates a default route to the 207.194.170.1
> gateway/router using the ppp0 interface in a new routing table #2.
> The next line creates a rule that says "any packet from within the
> 207.194.170.0/24 range (my static PPPoe IPs range) originating from this
> host should use the route table #2 to lookup the route".
> *Now* any traffic coming in ppp0 goes out ppp0 and any traffic coming in
> eth0 goes out eth0. So far so good. Now only time will tell if this
> hold together :) I wrote all this for others that might be trying to do
> the same thing as I did and are as lost as I was, of course in a few
> days I'll find out that there is a simple route command that'll do what
> I stressed out over for hours/days ;) Such is life...
> Phil.