A client library to generate ipset and iptables rules from LDAP records.
Project description
libnfldap
=========
A Python module to generate IPTables and IPSet rules from LDAP records.
See example.py for a demo.
Example
=======
The script at `example_allusers.py` will build iptables and ipset rules for all
users in LDAP. You can provide the script an ldap filter as argv[1] to limit the
scope.
```bash
$ time python example_allusers.py '(uid=jvehent)'
IPTables rules written in /tmp/tmpT7JgOW
IPSet rules written in /tmp/tmpJYtWM5
real 0m0.605s
user 0m0.061s
sys 0m0.014s
```
`example.py` does something similar but for a single user identified by its
uidNumber (unix user ID).
```bash
$ python example.py 2297
#Generating rules for user ID 1664
#====== ACL details ======
jvehent has access to .....
```
Authors
=======
Julien Vehent & Guillaume Destuynder (@ mozilla)
=========
A Python module to generate IPTables and IPSet rules from LDAP records.
See example.py for a demo.
Example
=======
The script at `example_allusers.py` will build iptables and ipset rules for all
users in LDAP. You can provide the script an ldap filter as argv[1] to limit the
scope.
```bash
$ time python example_allusers.py '(uid=jvehent)'
IPTables rules written in /tmp/tmpT7JgOW
IPSet rules written in /tmp/tmpJYtWM5
real 0m0.605s
user 0m0.061s
sys 0m0.014s
```
`example.py` does something similar but for a single user identified by its
uidNumber (unix user ID).
```bash
$ python example.py 2297
#Generating rules for user ID 1664
#====== ACL details ======
jvehent has access to .....
```
Authors
=======
Julien Vehent & Guillaume Destuynder (@ mozilla)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
libnfldap-1.0.0.tar.gz
(3.9 kB
view hashes)
Built Distribution
libnfldap-1.0.0.linux-x86_64.exe
(66.6 kB
view hashes)
Close
Hashes for libnfldap-1.0.0.linux-x86_64.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f83d19875a997f99702510ef3fd46ee46f15baaf3bcd81f54dd03f156ccb4d4 |
|
MD5 | 1bff46d1731543b1e2234f714c03920e |
|
BLAKE2b-256 | 760d7be2f8643f244f867f98c575d9d824a38f735d59b18e1c7609d5fb652a29 |