summaryrefslogtreecommitdiff
path: root/whois.jordan.im/index.7
blob: 5d01226dbcbfc5e3f14d1aee5a7cea3e820857c8 (plain)
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
.Dd March  24, 2022
.Dt WHOIS.JORDAN.IM 7
.Os "Alpine Linux"
.
.Sh NAME
.Nm asn
.Nd map hosts to their corresponding ASN over the WHOIS protocol

.Sh DESCRIPTION
.Lk https://git.jordan.im/asn "asn(1)"
is a WHOIS server which provides BGP announcement information sourced from
a local database cache generated using the
.Lk https://location.ipfire.org/ "IPFIRE"
dataset.
.Pp
.Sy whois.jordan.im
is a public
.Nm
instance for personal use.
.
.Sh USAGE
.
.Pp
.Lk https://man.openbsd.org/whois.1 "whois(1)"
can be used to communicate with the server using
.Ar --host
and
.Ar --port
arguments. Both hostnames and IP address are accepted.
.
.Bd -literal
$ whois -h whois.jordan.im google.com

IP Address               | AS Number | Country | AS Name | Announcement
-------------------------+-----------+---------+---------+--------------------
216.58.212.238           | 15169     | US      | GOOGLE  | 216.58.212.0/24
2a00:1450:4009:80b::200e | 15169     | IE      | GOOGLE  | 2a00:1450:4009::/48

$ whois -h whois.jordan.im 1.1.1.1

IP Address | AS Number | Country | AS Name       | Announcement
-----------+-----------+---------+---------------+-------------
1.1.1.1    | 13335     | AU      | CLOUDFLARENET | 1.1.1.0/24
.Ed
.
.Pp
If a hostname is provided, queries for each resolved A/AAAA record will be
returned. The dataset is regenerated daily to ensure response accuracy.

An instance of the
.Nm
HTTP component is hosted at
.Lk https://ip.jordan.im/ ip.jordan.im
which provides the requesting address's autonomous system information over HTTP
via JSON.
.
.Bd -literal
$ curl ip.jordan.im

{
  "host": "45.83.89.132",
  "hostname": "45-83-89-132.pool.ovpn.com",
  "org": "AS9009 M247 Europe SRL",
  "announcement": "45.83.89.0/24"
}
.Ed
.