03 / RULES & POLICIES
Rule Keywords: What matches and what happens
Rules are generally evaluated from top to bottom, and the first matching rule determines the action. Read match conditions separately from actions. If several rules could apply to a destination, check their order rather than simply confirming that a domain appears somewhere in the list.
Rule Keywords
DOMAIN
DOMAIN matches an exact domain name, making it suitable for a single specific hostname. For example, DOMAIN,example.com,DIRECT applies to example.com; it does not automatically include all its subdomains. If the destination is api.example.com, check the exact hostname or use an appropriate match type.
Rule Keywords
DOMAIN-SUFFIX
DOMAIN-SUFFIX matches a specified domain and its subdomains, making it useful for applying one policy across a domain hierarchy. DOMAIN-SUFFIX,example.com,PROXY can match example.com and api.example.com, but not every domain that happens to contain that string. It matches domain hierarchy, not paths in a web address.
Rule Keywords
DOMAIN-KEYWORD
DOMAIN-KEYWORD checks whether a domain contains a specified string, usually matching more broadly than an exact-domain or suffix rule. For example, the keyword ads may match multiple domains containing that sequence. Check the risk of false matches before using it to block connections; domains containing the same string do not necessarily belong to the same service.
Rule Keywords
IP-CIDR / IP-CIDR6
IP-CIDR matches IPv4 address ranges; IP-CIDR6 is for IPv6. The prefix length after the slash determines the range. For example, IP-CIDR,192.168.0.0/16,DIRECT applies DIRECT to that IPv4 range. Domain traffic may involve DNS resolution, so interpret address-based matches in light of the DNS results too.
Rule Keywords
GEOIP
GEOIP uses an IP geolocation database to determine a destination's region. It does not classify traffic by a website's display language, domain suffix, or provider's registered location. Database classifications can differ, and services may use distributed IP addresses. If a rule matches unexpectedly, check the destination IP and consider using a more specific domain or address rule.
Rule Keywords
FINAL
FINAL determines what happens when none of the earlier rules match and is usually placed at the end of the ruleset. FINAL,DIRECT sends the remaining connections to DIRECT; it does not force all connections to go direct. Changing this rule affects traffic not covered by earlier rules. When testing, first check whether an earlier rule already matches the destination.
Actions
PROXY
PROXY is a rule action that sends matching connections through the corresponding proxy route. A working server with valid parameters is still required. It is related to Proxy mode in Global Routing, but is a setting at a different level. Adding a PROXY rule does not create a server or fill in its authentication details.
Actions
DIRECT
DIRECT connects matching traffic to its destination over the current network without using a proxy route for that connection. The result still depends on the local network, DNS, and destination service; direct access is not guaranteed to work. DIRECT in a rule applies only to matches, while Direct in Global Routing is an overall mode.
Actions
REJECT
REJECT blocks matching connections and is usually used with specific domain or address conditions. If a page resource fails to load, check whether an overly broad rule matched it before assuming the server is down. Identify the destination and matching rule before making changes; narrowing the match is easier to review than deleting rules wholesale.