>IPFilter isn't responsible for routing, just for checking that packets 
>are going the correct way.
>
>If you're trying to use IPFilter to force routing via certain interfaces, 
>I don't believe this will work.


It actually does work, I've been using it for the longest time.


The system will pick a route based on the routing table and the destination
address.  If the from address doesn't match the outgoing interface, the
packet will likely be dropped by the ISP so you tell ipfilter to
redirect it to the first hop router on the proper interfaces.

But it breaks down quite spectacularly:

        - if the ARP entry for the system's route disappears (it becomes
          unreachable), then the packets will not even be send.

        - if the ARP entry for the preferred route disappears nasty things
          can happen.

And for some phases of the moon this has gotten me kernel panics because
of stack overflows but that might have been a configuration problem.


>> Hi All,
>> 
>> Here is my config,
>> pass out quick on dmfe0 to dmfe1:134.7.3.254 from 134.7.3.152/32 to any
>> pass out quick on dmfe1 to dmfe0:134.7.7.254 from 134.7.7.152/32 to any
>> 
>> as you can see this is meant to forward packets out on the same
>> interface
>> they arrived.
>
>Are you sure ? It looks more like it's trying to forward packets out on a 
>different interface than the one they arrived on.

No, that looks correct; if the kernel wants to send a packet on dmfe0 which
has a source address of 134.7.3.152 (which I assume is the source address 
of dmfe1, seeing the router address); put it on the queue of dmfe1 and
send it to 134.7.3.254 which is, I assume, the first hop router for that
net.

I've been using a similar configuration for some time; but as pointed  out
above, without support from the kernel proper it is really hard for ipf to do
the right thing in all circumstances.


Casper

Reply via email to