IP Mask

An IP Mask field contains an IP mask to limit access to objects.

Input format

An IP mask is a string that can contain:

  • Two IPv4 addresses separated by a dash to denote a range. I.e. 1.2.3.4-1.2.3.6; or
  • Two IPv6 addresses separated by a dash to denote a range. I.e. 2001::1-2001::3; or
  • One IPv4 / IPv6 address, i.e. 1.2.3.4 or 2001::1
  • An IPv4 / IPv6 address followed by a netmask, i.e. 1.2.3.4/24 or 2001::1/48

Examples include:

1.2.3.4
1.2.3.4/24
1.2.3.4-5.6.7.8
2001:1:2::1
2001:1:2::1/64
2001:1:2::1-2001:1:2::ff

Output format

In JSON output, an IP Mask is specified as a string with the same format as in the input, for example:

[
   "1.2.3.4",
   "1.2.3.4/24",
   "1.2.3.4-5.6.7.8",
   "2001:1:2::1",
   "2001:1:2::1/64",
   "2001:1:2::1-2001:1:2::ff"
]