.\" Automatically generated by Pandoc .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "mmdblookup" "1" "" "" "" .hy .SH NAME .PP mmdblookup - a utility to look up an IP address in a MaxMind DB file .SH SYNOPSIS .PP mmdblookup --file [FILE PATH] --ip [IP ADDRESS] [DATA PATH] .SH DESCRIPTION .PP \f[V]mmdblookup\f[R] looks up an IP address in the specified MaxMind DB file. The record for the IP address is displayed in a JSON-like structure with type annotations. .PP If an IP\[aq]s data entry resolves to a map or array, you can provide a lookup path to only show part of that data. .PP For example, given a JSON structure like this: .IP "" 4 .nf \f[C] { \[dq]names\[dq]: { \[dq]en\[dq]: \[dq]Germany\[dq], \[dq]de\[dq]: \[dq]Deutschland\[dq] }, \[dq]cities\[dq]: [ \[dq]Berlin\[dq], \[dq]Frankfurt\[dq] ] } \f[R] .fi .PP You could look up just the English name by calling mmdblookup with a lookup path of: .IP "" 4 .nf \f[C] mmdblookup --file ... --ip ... names en \f[R] .fi .PP Or you could look up the second city in the list with: .IP "" 4 .nf \f[C] mmdblookup --file ... --ip ... cities 1 \f[R] .fi .PP Array numbering begins with zero (0). .PP If you do not provide a path to lookup, all of the information for a given IP will be shown. .SH OPTIONS .PP This application accepts the following options: .TP -f, --file The path to the MMDB file. Required. .TP -i, --ip The IP address to look up. Required. .TP -v, --verbose Turns on verbose output. Specifically, this causes this application to output the database metadata. .TP --version Print the program\[aq]s version number and exit. .TP -h, -?, --help Show usage information. .SH BUG REPORTS AND PULL REQUESTS .PP Please report all issues to our GitHub issue tracker (https://github.com/maxmind/libmaxminddb/issues). We welcome bug reports and pull requests. Please note that pull requests are greatly preferred over patches. .SH AUTHORS .PP This utility was written by Boris Zentner (bzentner\[at]maxmind.com) and Dave Rolsky (drolsky\[at]maxmind.com). .SH COPYRIGHT AND LICENSE .PP Copyright 2013-2023 MaxMind, Inc. .PP Licensed under the Apache License, Version 2.0 (the \[dq]License\[dq]); you may not use this file except in compliance with the License. You may obtain a copy of the License at .IP "" 4 .nf \f[C] https://www.apache.org/licenses/LICENSE-2.0 \f[R] .fi .PP Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \[dq]AS IS\[dq] BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .SH SEE ALSO .PP libmaxminddb(3)