Re: [Exim] DB look up of 192.168.1.0/24 type IP addresses

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Karl Schmidt
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] DB look up of 192.168.1.0/24 type IP addresses
On Mon, 6 Aug 2001, Karl Schmidt wrote:

> If one has a blocking list of IP addresses that contain the 'slash'-bits
> notation(i.e. 192.168.1.0/24) - will that work with exim_dbmbuild to create
> ? What about a cdb file?
>
> I would think there may be some performance issues here.


If you set up a lookup of the form

net24-cdb;/some/file

and your host receives a call from, say 192.168.1.2, then Exim will call
the cdb lookup function with an argument that is the _string_

192.168.1.0/24

This is not a binary number. It is a string representation of the number
and the mask. Just one lookup. Is that clear? Maybe it will help if I
say that if you were using net24-lsearch, the lines in the file could be

192.168.1.0/24
10.9.8.7/24
...

If you want to mix /24 and /dd (where dd is not 24) in the same file,
you have to do multiple lookups.



-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.