03 / Rules & Policies
Rule Keywords & Policies
What makes up a rule? First identify the matching condition, then the policy to apply. The example domain example.com below is for syntax only; after reviewing it, check the order in your own configuration.
Rule Keywords & Policies
Rule
What does a rule do? A Rule maps request-matching conditions to a policy. Rules are usually checked from top to bottom, and the policy for the first match is applied. Place more specific exceptions before broader conditions. When troubleshooting, find the first matching rule rather than checking only the one you added most recently.
Rule Keywords & Policies
DOMAIN
How do you match a single exact domain? DOMAIN matches a domain exactly. For example, specifying example.com does not automatically include www.example.com. Enter only the domain in the condition—no https://, port, or webpage path. If you need to cover subdomains, consider whether DOMAIN-SUFFIX is more appropriate.
DOMAIN,example.com,DIRECT
Rule Keywords & Policies
DOMAIN-SUFFIX
How do you match both a root domain and its subdomains? DOMAIN-SUFFIX matches at the domain suffix boundary. For example, example.com matches the domain itself and subdomains such as www.example.com, but not any domain that merely contains the same string. If a particular subdomain needs a different policy, place its specific rule before this broader one.
DOMAIN-SUFFIX,example.com,PROXY
Rule Keywords & Policies
DOMAIN-KEYWORD
How do you match a domain containing a particular string? DOMAIN-KEYWORD checks whether a domain contains the specified string, which may match across different domain suffixes. It is broader than an exact domain or suffix condition and may match destinations you did not intend to include. Before using it, list examples of expected and unexpected matches.
Rule Keywords & Policies
GEOIP
Does GEOIP determine a website’s language? No. It matches a destination using the location associated with its IP address in a geolocation database, not the webpage language or the visitor’s location. The database may differ from actual network deployment, and changes to the destination address can affect results. When troubleshooting, check the actual resolved address and which rule matched.
GEOIP,CN,DIRECT
Rule Keywords & Policies
IP-CIDR / IP-CIDR6
How do you specify a range of destination addresses? IP-CIDR matches IPv4 ranges, while IP-CIDR6 matches IPv6 ranges. The prefix length after the slash determines the range. A prefix that is too broad will include more addresses; a similar-looking address prefix alone does not prove the match is correct. If the destination has both address types, also check which address family is actually in use.
IP-CIDR,192.0.2.0/24,DIRECT
IP-CIDR6,2001:db8::/32,DIRECT
Rule Keywords & Policies
USER-AGENT
Can USER-AGENT identify every app? It matches readable HTTP User-Agent information; it does not identify requests by app identity. The relevant information in encrypted requests is usually not directly readable, so matching depends on what is visible in the request. Before writing a rule, confirm that the request contains the field you need. Do not treat USER-AGENT as a universal way to route traffic by app.
Rule Keywords & Policies
FINAL
What happens if none of the earlier rules match? FINAL specifies the final policy and is usually placed at the end of the rule list. If you put it before specific rules, later conditions may not get the expected chance to match. Choose DIRECT or PROXY based on your own configuration goals rather than treating an example as a one-size-fits-all answer.
FINAL,DIRECT
Rule Keywords & Policies
PROXY / DIRECT / REJECT
What happens after a rule matches? PROXY sends the request through a proxy, DIRECT connects directly, and REJECT denies the request. The proxy endpoint used also depends on the current selection and configuration. These are handling outcomes, not matching conditions. Using REJECT incorrectly can block access, so confirm the matching scope first.