Class Firewall.Rule

  • Enclosing class:
    Firewall

    public abstract static class Firewall.Rule
    extends Object
    A protocol and port-range tuple that describes a permitted connection.
    • Method Detail

      • ipProtocol

        public abstract String ipProtocol()
        This can either be a well known protocol string (tcp, udp or icmp) or the IP protocol number.
      • ports

        @Nullable
        public abstract List<String> ports()
        An optional list of ports which are allowed. This is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range (ex. 12345-12349). If not specified, connections through any port are allowed.