Skip to contentSkip to conversation

Can't one filter based on a single destination address?

LARTC Andrew [email protected] 1 participant 1 message Dec 11, 2000

lore
Share & tools
lore

Andrew [email protected]

author
#0 lore raw

<PRE>Greetings:

I'm running kernel 2.2.17 and I've been trying to add a rule which looks up table main based on a single destination address. Here it is:

&gt;<i>ip rule add from 0.0.0.0/0 to 192.168.107.28 lookup main prio 110 </I>

The rule adds fine however it seems that the kernel fails to match the destination condition.
Incidentally 192.168.107.28 is the local address of an interface on the box where I'm adding the rule. The machine I'm testing from is on the same physical network and has address 192.168.107.27. I'm using ping to test.

With the above rule in place, and a blackhole rule immediately following it. I can't ping 192.168.107.28 from .27. However if I change the rule above to read:

&gt;<i>ip rule add from 0.0.0.0/0 to 192.168.107.0/24 lookup main prio 110 </I>
then I can ping fine. Thinking that I might be required to specify a mask, I even tried the following version:

&gt;<i>ip rule add from 0.0.0.0/0 to 192.168.107.28/32 lookup main prio 110 </I>

No luck. Does any one know what's going on?

-Andrew

Signature · 6 lines
<A HREF="mailto:[email protected]">[email protected]</A>
--------------------------------------------------------------
Want answers to life's big questions? Visit www.bibleinfo.com.


</PRE>