Bluehost.com Web Hosting $6.95

Re: netmask lengths and rdr rules

This is a discussion on Re: netmask lengths and rdr rules within the IPFilter forums, part of the System Security and Security Related category; On Tue, Sep 28, 2004 at 11:41:43AM +0100, David Pick wrote: > > I'm trying to use ...


Go Back   Usenet Forums > System Security and Security Related > IPFilter

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-28-2004
Guido van Rooij
 
Posts: n/a
Default Re: netmask lengths and rdr rules

On Tue, Sep 28, 2004 at 11:41:43AM +0100, David Pick wrote:
>
> I'm trying to use a fairly complicated setup with rdr rules and I
> don't understand a feature of the NAT/RDR processing fully. There
> is a loop in the code (and the MAP code) that looks for more
> specific rules vefore less specific rules. What is *not* clear
> (although it would be if I spent *enough* time staring at the code)
> is just which part of the rule is being processed in this way.
>
> Let's take:
> rdr fxp0 from a.a.a.a/ma to b.b.b.b/mb -> r.r.r.r/mr
>
> Is the mask being tested at various precicions "ma" or "mb"? or "mr"?
>
> To put it another way, take:
> rdr fxp0 from 10.1.1.0/24 to 172.16.1.0/24 -> 192.168.1.1/32
> rdr fxp0 from 10.1.1.0/26 to 172.16.1.0/24 -> 192.168.1.1/32
> rdr fxp0 from 10.1.1.0/24 to 172.16.1.0/26 -> 192.168.1.1/32
> and a packet from 10.1.1.1 to 172.16.1.1. Since the second and third
> rules are more specific than the first, they should be found before
> the first. But *which* one will be found first?
>
> The same question applies to "map" rules: I suspect the answer is
> different from the "rdr" case...
>
> Can anyone help?...



The way I read the (4.1.3) code is that with rdr, mb is the mask that
determines how specific a rule is. If b.b.b.b/mb are equal for 2 rules,
rules are matched nin the order they appear in the config file.
With nat, it is a.a.a.a/ma that determines how specific a rule is.

Darren should correct me if I'm wrong.

-Guido
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:14 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0