lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit 7fc9b99b authored by Michael Tremer's avatar Michael Tremer

man: Document export command

Fixes: #12437
Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 2f42147f
......@@ -5,6 +5,7 @@ location - Query the location database
== SYNOPSIS
[verse]
`location export --directory=DIR [--format=FORMAT] [--family=ipv6|ipv4] [ASN|CC ...]`
`location get-as ASN [ASN...]`
`location list-countries [--show-name] [--show-continent]`
`location list-networks-by-as ASN`
......@@ -37,6 +38,15 @@ or countries.
== COMMANDS
'export --directory=DIR [--format=FORMAT] [--family=ipv6|ipv4] [ASN|CC ...]'::
This command exports the whole database into the given directory.
+
The output can be filtered by only exporting a certain address family, or by passing
a list of country codes and/or ASNs. The default is to export all known countries.
+
The output format can be chosen with the '--format' parameter. For possible formats,
please see below.
'get-as ASN [ASN...]'::
This command returns the name of the owning organisation of the Autonomous
System.
......@@ -104,6 +114,17 @@ The 'location' command will normally exit with code zero.
If there has been a problem and the requested action could not be performed,
the exit code is unequal to zero.
== FORMATS
Some commands allow specifying the output format. This is helpful if the exported
data should be imported into a packet filter for example.
The following formats are understood:
* 'list' (default): Just lists all networks, one per line
* 'ipset': For ipset
* 'nftables': For nftables
* 'xt_geoip': Returns a list of networks to be loaded into the
xt_geoip kernel module
== HOW IT WORKS
The downloader checks a DNS record for the latest version of the database.
It will then try to download a file with that version from a mirror server.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment