| |||||||||||||||||||||||||||||||
|
> > Rolf E. Sonneveld schreef: >> Ruud Baart wrote: >>> A normal mynetworks parameters looks like: >>> mynetworks = $config_directory/mynetworks >>> and in this file are all the networks listed: >>> 192.168.1.0/24 >>> 172.23.10.0/24 >>> 127.0.0.0/8 >>> 217.1.2.3/28 >>> >>> Is it possible to replace this lookup with a LDAP lookup? >>> >>> I tried this: >>> mynetworks = ldap:$config_directory/ldap/mynetworks.cf >>> >>> And the query is: >>> server_host = ldap://localhost >>> bind_dn = cn=Postfix,dc=example,dc=com >>> bind_pw = secret >>> search_base = ou=Networks,cn=Postfix,dc=example,dc=com >>> query_filter = (ipNetworkNumber=%s) >>> result_attribute = ipNetworkNumber >>> >>> With >>> postmap -q 192.168.1.0/24 ldap:./mynetworks.cf >>> I get result back. But with >>> postmap -q 192.168.1.1 ldap:./mynetworks.cf >>> I get no result back although it is an allowed network address. >>> >>> Perhaps it is simple but I can't find a proper solution. Does someone >>> give me a hint how I can lookup specific IP numbers and storing IP >>> ranges in LDAP? >> >> The problem presumably lies in the fact that you're storing mynetworks >> data in CIDR format, but the type of map you use is an LDAP one. I'm >> not sure whether you can combine cidr- and ldap type maps, like: >> >> mynetworks = cidr:ldap:$config_directory/ldap/mynetworks.cf >> >> I assume this will not work, however.... >> >> /rolf > > No does not work. I already tried some something like that: everything > behind the first : is interpreted as filename and not as new map > > R.J. Baart > If you want to store mynetworks in ldap, you will need to list *each and every* complete host address, not cidr ranges or leading octects. -- Noel Jones
| ||||||||||||||||||||||||||||||
© 2004-2008 readlist.com