1mmdblookup(1) mmdblookup(1)
2
3
4
6 mmdblookup - a utility to look up an IP address in a MaxMind DB file
7
9 mmdblookup --file [FILE PATH] --ip [IP ADDRESS] [DATA PATH]
10
12 mmdblookup looks up an IP address in the specified MaxMind DB file.
13 The record for the IP address is displayed in a JSON-like structure
14 with type annotations.
15
16 If an IP's data entry resolves to a map or array, you can provide a
17 lookup path to only show part of that data.
18
19 For example, given a JSON structure like this:
20
21
22 {
23 "names": {
24 "en": "Germany",
25 "de": "Deutschland"
26 },
27 "cities": [ "Berlin", "Frankfurt" ]
28 }
29
30 You could look up just the English name by calling mmdblookup with a
31 lookup path of:
32
33
34 mmdblookup --file ... --ip ... names en
35
36 Or you could look up the second city in the list with:
37
38
39 mmdblookup --file ... --ip ... cities 1
40
41 Array numbering begins with zero (0).
42
43 If you do not provide a path to lookup, all of the information for a
44 given IP will be shown.
45
47 This application accepts the following options:
48
49 -f, --file
50 The path to the MMDB file. Required.
51
52 -i, --ip
53 The IP address to look up. Required.
54
55 -v, --verbose
56 Turns on verbose output. Specifically, this causes this appli‐
57 cation to output the database metadata.
58
59 --version
60 Print the program's version number and exit.
61
62 -h, -?, --help
63 Show usage information.
64
66 Please report all issues to our GitHub issue tracker
67 (https://github.com/maxmind/libmaxminddb/issues). We welcome bug
68 reports and pull requests. Please note that pull requests are greatly
69 preferred over patches.
70
72 This utility was written by Boris Zentner (bzentner@maxmind.com) and
73 Dave Rolsky (drolsky@maxmind.com).
74
76 Copyright 2013-2014 MaxMind, Inc.
77
78 Licensed under the Apache License, Version 2.0 (the "License"); you may
79 not use this file except in compliance with the License. You may
80 obtain a copy of the License at
81
82
83 http://www.apache.org/licenses/LICENSE-2.0
84
85 Unless required by applicable law or agreed to in writing, software
86 distributed under the License is distributed on an "AS IS" BASIS, WITH‐
87 OUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
88 See the License for the specific language governing permissions and
89 limitations under the License.
90
92 libmaxminddb(3)
93
94
95
96 mmdblookup(1)