howto/lglass.md
... ...
@@ -0,0 +1,91 @@
1
+lglass is a Python software package designed for Internet Registries like the DN42. You can generate zone files for DNS and rDNS IPv4/v6, and handle the registry. It is available on GitHub as free software:
2
+
3
+ $ git clone git://github.com/fritz0705/lglass.git
4
+
5
+## Links
6
+- [Fritz Gihub repo](https://github.com/fritz0705/lglass)
7
+- [lglass Manual](http://lglass.flonet.dn42/)
8
+
9
+## Running your own Whois daemon
10
+
11
+lglass provides an event-based whois daemon with internal caching, which was written in Python. It is very simple to run an instance:
12
+
13
+ $ ./bin/lglass-whoisd
14
+
15
+without the configfile:
16
+
17
+ $ ./bin/lglass-regtool whoisd -H $HOST -p $PORT
18
+.
19
+
20
+ usage: lglass-whoisd [-h] [-4] [-6] [--host HOST] [--port PORT]
21
+ [--cidr] [--no-cidr] [--inverse] [--no-inverse]
22
+
23
+ optional arguments:
24
+ -h, --help show this help message and exit
25
+ -4 Listen on IPv4
26
+ -6 Listen on IPv6
27
+ --host HOST, -H HOST Listen on host
28
+ --port PORT, -p PORT Listen on port
29
+ --cidr, -c Perform CIDR matching on queries
30
+ --no-cidr Do not perform CIDR matching on queries
31
+ --inverse, -i Perform inverse matching on queries
32
+ --no-inverse Do not perform inverse matching on queries
33
+
34
+
35
+## Generate zone files
36
+
37
+lglass also provides a script to generate zone files from the registry. It's named zonegen.py and requires a registry dump from Monotone.
38
+
39
+To generate DNS zones:
40
+
41
+ $ ./bin/lglass-zonegen -d $PATH_TO_DATA_DIR -n ns1... -n ns2... -e foo.bar.com dns -z dn42
42
+
43
+To generate IPv4 rDNS zones:
44
+
45
+ $ ./bin/lglass-zonegen -d $PATH_TO_DATA_DIR -n ns1... -n ns2... -e foo.bar.com rdns4 -N 172.22.0.0/16
46
+
47
+To generate IPv6 rDNS zones:
48
+
49
+ $ ./bin/lglass-zonegen -d $PATH_TO_DATA_DIR -n ns1... -n ns2... -e foo.bar.com rdns6 -N fd00::/8
50
+
51
+## Reformat RPSL files
52
+
53
+You can also reformat RPSL files using lglass by using the lglass.rpsl module:
54
+
55
+ $ ./bin/lglass-rpsl < $DATA/inetnum/172.22.0.53_32
56
+
57
+lglass.rpsl also supports in-place operation:
58
+
59
+ $ ./bin/lglass-rpsl -i $DATA/inetnum/172.22.0.53_32
60
+
61
+This opens the file, reads the content into memory, seeks to position 0, writes the formatted object and truncates the file.
62
+Simple web interface
63
+
64
+lglass also comes with a simple web interface written in Python3 using Bottle and Jinja2. It also provides a binary to run it using wsgiref:
65
+
66
+ $ ./bin/lglass-web
67
+
68
+Furthermore you can use any WSGI server like Gunicorn by using lglass.web.application:app as WSGI callback. You can provide a path to the configuration file in the environment variable `LGLASS_WEB_CFG`.
69
+
70
+## Configuration
71
+
72
+The configuration file format is JSON and allows configuration of the database chain, the listen parameters, the custom messages and the process management.
73
+
74
+| Option | Meaning |
75
+|----------|:-------------|
76
+| listen.host |IP address for listening socket (Default: ::)|
77
+|listen.port|TCP port for listening socket (Default: 4343)|
78
+|listen.protocol|Protocol for listening socket (4 or 6, by default 6)|
79
+|database|Array of database URLs to initialize database chain|
80
+|database.types|Array of object types in database (Default: undefined)<br/>Default chain:<br/>[<br/> "whois+lglass.database.file+file:.",<br/> "whois+lglass.database.cidr+cidr:",<br/> "whois+lglass.database.schema+schema:",<br/> "whois+lglass.database.cache+cached:"<br/>]|
81
+|messages.preamble|String preamble for whois responses|
82
+|messages.help|String help message for help requests|
83
+|process.user|User to change after initialization|
84
+|process.group|Group to change after initialization|
85
+|process.pidfile|Path to PID file|
86
+
87
+## RPSL
88
+- Routing Policy Specification Language [RFC2622](https://tools.ietf.org/html/rfc2622)
89
+- Routing Policy Specification Language next generation (RPSLng) [RFC4012](https://tools.ietf.org/html/rfc4012)
90
+- <http://www.ripe.net/data-tools/db/rpsl>
91
+- <http://www.ripe.net/data-tools/db/rpsl/transition-to-rpsl-version-of-the-ripe-database>
internal/lglass.md
... ...
@@ -1,91 +0,0 @@
1
-lglass is a Python software package designed for Internet Registries like the DN42. You can generate zone files for DNS and rDNS IPv4/v6, and handle the registry. It is available on GitHub as free software:
2
-
3
- $ git clone git://github.com/fritz0705/lglass.git
4
-
5
-## Links
6
-- [Fritz Gihub repo](https://github.com/fritz0705/lglass)
7
-- [lglass Manual](http://lglass.flonet.dn42/)
8
-
9
-## Running your own Whois daemon
10
-
11
-lglass provides an event-based whois daemon with internal caching, which was written in Python. It is very simple to run an instance:
12
-
13
- $ ./bin/lglass-whoisd
14
-
15
-without the configfile:
16
-
17
- $ ./bin/lglass-regtool whoisd -H $HOST -p $PORT
18
-.
19
-
20
- usage: lglass-whoisd [-h] [-4] [-6] [--host HOST] [--port PORT]
21
- [--cidr] [--no-cidr] [--inverse] [--no-inverse]
22
-
23
- optional arguments:
24
- -h, --help show this help message and exit
25
- -4 Listen on IPv4
26
- -6 Listen on IPv6
27
- --host HOST, -H HOST Listen on host
28
- --port PORT, -p PORT Listen on port
29
- --cidr, -c Perform CIDR matching on queries
30
- --no-cidr Do not perform CIDR matching on queries
31
- --inverse, -i Perform inverse matching on queries
32
- --no-inverse Do not perform inverse matching on queries
33
-
34
-
35
-## Generate zone files
36
-
37
-lglass also provides a script to generate zone files from the registry. It's named zonegen.py and requires a registry dump from Monotone.
38
-
39
-To generate DNS zones:
40
-
41
- $ ./bin/lglass-zonegen -d $PATH_TO_DATA_DIR -n ns1... -n ns2... -e foo.bar.com dns -z dn42
42
-
43
-To generate IPv4 rDNS zones:
44
-
45
- $ ./bin/lglass-zonegen -d $PATH_TO_DATA_DIR -n ns1... -n ns2... -e foo.bar.com rdns4 -N 172.22.0.0/16
46
-
47
-To generate IPv6 rDNS zones:
48
-
49
- $ ./bin/lglass-zonegen -d $PATH_TO_DATA_DIR -n ns1... -n ns2... -e foo.bar.com rdns6 -N fd00::/8
50
-
51
-## Reformat RPSL files
52
-
53
-You can also reformat RPSL files using lglass by using the lglass.rpsl module:
54
-
55
- $ ./bin/lglass-rpsl < $DATA/inetnum/172.22.0.53_32
56
-
57
-lglass.rpsl also supports in-place operation:
58
-
59
- $ ./bin/lglass-rpsl -i $DATA/inetnum/172.22.0.53_32
60
-
61
-This opens the file, reads the content into memory, seeks to position 0, writes the formatted object and truncates the file.
62
-Simple web interface
63
-
64
-lglass also comes with a simple web interface written in Python3 using Bottle and Jinja2. It also provides a binary to run it using wsgiref:
65
-
66
- $ ./bin/lglass-web
67
-
68
-Furthermore you can use any WSGI server like Gunicorn by using lglass.web.application:app as WSGI callback. You can provide a path to the configuration file in the environment variable `LGLASS_WEB_CFG`.
69
-
70
-## Configuration
71
-
72
-The configuration file format is JSON and allows configuration of the database chain, the listen parameters, the custom messages and the process management.
73
-
74
-| Option | Meaning |
75
-|----------|:-------------|
76
-| listen.host |IP address for listening socket (Default: ::)|
77
-|listen.port|TCP port for listening socket (Default: 4343)|
78
-|listen.protocol|Protocol for listening socket (4 or 6, by default 6)|
79
-|database|Array of database URLs to initialize database chain|
80
-|database.types|Array of object types in database (Default: undefined)<br/>Default chain:<br/>[<br/> "whois+lglass.database.file+file:.",<br/> "whois+lglass.database.cidr+cidr:",<br/> "whois+lglass.database.schema+schema:",<br/> "whois+lglass.database.cache+cached:"<br/>]|
81
-|messages.preamble|String preamble for whois responses|
82
-|messages.help|String help message for help requests|
83
-|process.user|User to change after initialization|
84
-|process.group|Group to change after initialization|
85
-|process.pidfile|Path to PID file|
86
-
87
-## RPSL
88
-- Routing Policy Specification Language [RFC2622](https://tools.ietf.org/html/rfc2622)
89
-- Routing Policy Specification Language next generation (RPSLng) [RFC4012](https://tools.ietf.org/html/rfc4012)
90
-- <http://www.ripe.net/data-tools/db/rpsl>
91
-- <http://www.ripe.net/data-tools/db/rpsl/transition-to-rpsl-version-of-the-ripe-database>
services/Whois.md
... ...
@@ -75,7 +75,7 @@ The idea comes from the guys at cymru.com, who provide this service for the Inte
75 75
76 76
# Software
77 77
78
- * [lglass](/internal/lglass) is a python implementation for working with the registry. It features a whois server, tools to manipulate the data (DNS zone generation, etc).
78
+ * [lglass](/howto/lglass) is a python implementation for working with the registry. It features a whois server, tools to manipulate the data (DNS zone generation, etc).
79 79
* [whois42d](https://git.dn42.dev/registry/whois42d) written in golang, lightweight/fast, whois server with support for all registry objects, type filtering and systemd socket activation.
80 80
81 81
# Whois daemons