forked from daknob/mwhois
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
71 lines (64 loc) · 3.2 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
mwhois
Copyright (c) 2015 Antonios A. Chariton <[email protected]>
Description:
mwhois is server software compatible with the whois(1) command
on most Linux and Unix systems. It is fully compliant with the
RFC 3912. It can serve domain name and IPv4/ IPv6 whois records
when queried and uses a Linux / Unix filesystem structure for
storing all the records.
Requirements:
- Linux / Unix based operating system
- Python 2.7
License:
The project is under the MIT License on its whole, except from
the "netaddr" python library that has a separate license, which
is included in the respective folder. The library is included
in order to ensure compatibility and is updated when deemed
necessary.
Usage:
In order to use the server, simply run the whois(1) command in
any operating system with the -h flag followed by your server's
IP Address and then the query. An example asking localhost
about 10.0.0.0 is: whois -h 127.0.0.1 10.0.0.1.
Configuration:
In the file mwhoisd there are four (4) configuration variables
in the beggining, lines 8-11, conveniently named as following:
LISTEN_ADDRESS, LISTEN_PORT, MAX_QUERY_SIZE and LOGFILE
Each one is self-explanatory, but here is the explanation just
in case:
- LISTEN_ADDRESS : The IPv4/IPv6 Address the server listens on
- LISTEN_PORT : The Port Number where the server listens at
- MAX_QUERY_SIZE : The maximum size, in bytes, of a valid query
for either an IPv4 Address or a Domain Name
- LOGFILE : The file path where the logs of the server will be
saved to. If it is empty the server keeps no logs
Files:
There are several files in this repository that required and a
few others that are optional but increase the ease of use for
this software:
- mwhoisd : The primary server than runs and serves all clients
If it runs on the default port 43, or writes logs
in the default directory it has to be running as
the user 'root'.
- LICENSE : The license of the software
- DOC : This file, containing useful documentation
- add-ip : A helpful script to add IP Ranges in the database
- add-ip-auto : A wizard for adding IP Blocks to the database
- add-ip-wind : A wizard to add IP Blocks w/ "ID" instead of AS
- add-domain : A script to add domain names in the database
- hwhois : A bash script to use in order to contact a custom
whois server such as whois.daknob.net (127.0.0.1)
- netaddr : An external python library required for the server
- db : A folder in which lies the internal database for lookups
Storage Structure:
The database that is served by mwhois is using the Linux / Unix
filesystem in order to store content. There is a folder named
"db" with three sub-folders, "ipv4", "ipv6" and "domains".
All IP records are stored in files named after the IP Address
CIDR Block. For example, the network 10.0.0.0/8 is stored
in a file named 10.0.0.0-8 that contains all the information
that will be served. All the new lines in this file must be
represented by <CR><LF> in order to maintain full compatibility
with RFC 3912. As far as domain names are concerned,the storage
is similar, where the name of the file is the actual domain
name.