Skip to content

Geo bans

A geo ban hides one record value — an A, AAAA, SRV or CNAME value — from clients in an area. Like health checks, every geo-ban command first names the value: ZONE NAME TYPE DATA, or ZONE NAME TYPE --id UUID.

Terminal window
dinio geo-ban add example.com www A 192.0.2.1 --area RU --area "Eastern Asia"
dinio geo-ban list example.com www A 192.0.2.1
dinio geo-ban rm example.com www A 192.0.2.1 --area RU
dinio geo-ban areas europe

--area accepts, case-insensitively (every area and its codes are listed in Geo areas):

Form Examples
Country code, ISO 3166-1 alpha-2 or alpha-3 HR, HRV, DE
Country, sub-region or region name Croatia, Southern Europe, Europe
level:code or level:name country:191, subregion:39, region:Europe

A bare number is rejected: region and country codes overlap, so say which one you mean with country:, subregion: or region:. All areas are checked before anything is changed, so a typo never leaves half of the bans applied.

dinio geo-ban areas [FILTER] lists every known area with its level, code and ISO code; FILTER matches part of a name, or a code. The list comes from Dinio and is cached for a day; --refresh reads it again.

Command
geo-ban list VALUE The value’s bans: level, code, area name, ban id.
geo-ban add VALUE --area AREA… Ban one or more areas. Areas that are already banned are skipped.
geo-ban rm VALUE --area AREA… Remove the bans on these areas.
geo-ban rm VALUE --ban-id UUID Remove one ban by its id.
geo-ban rm VALUE --all Remove every ban of the value. Asks for confirmation.
geo-ban areas [FILTER] [--refresh] List the areas you can use.

VALUE is ZONE NAME TYPE DATA… or ZONE NAME TYPE --id UUID.