Class FirewallZone.Name

  • All Implemented Interfaces:
    DtoFactory<FirewallZoneName>, Internable<FirewallZone.Name>, Serializable, Comparable<FirewallZone.Name>
    Enclosing class:
    FirewallZone

    public static final class FirewallZone.Name
    extends Object
    implements Comparable<FirewallZone.Name>, Serializable, DtoFactory<FirewallZoneName>, Internable<FirewallZone.Name>
    Represents a name that may be used for a FirewallZone. Zones names must:
    • Be non-null
    • Be non-empty
    • Be between 1 and 17 characters
    • Contain the characters [a-z], [A-Z], [0-9], underscore (_), hyphen (-), and slash (/)
    • Not begin with a slash (/)
    • Not end with a slash (/)
    • Not contain more than one slash (/)

    We're unable to find well-defined rules for valid zone names. The rules above are based on the source code for firewalld included with CentOS 7.

    1. See /usr/lib/python2.7/site-packages/firewall/core/io/zone.py, check_name.
    2. See /usr/lib/python2.7/site-packages/firewall/core/io/io_object.py, check_name.
    3. See /usr/lib/python2.7/site-packages/firewall/functions.py, max_zone_name_len.

    Additionally, we tried creating a new zone with some UTF-8 characters, specifically Japanese, and firewalld-cmd just stalled, not even responding to Ctrl-C. We are implementing with a strict ASCII-compatible definition of "alphanumeric".

    Author:
    AO Industries, Inc.
    See Also:
    Serialized Form