Skip to Content
Cybrave OS

Security Profiles

HTTP and DNS response profiles referenced by security rule sub-actions.

Response profiles define the synthetic response the firewall serves in place of the real one when a deny rule applies. Select them in a deny security rule's application overrides to replace the default response behavior. Save and commit both the profile and rule changes.

HTTP Responses

Select an HTTP response profile in a deny rule's HTTP override. The rule does not have to select HTTP as its only application; its conditions must leave a compatible transport possible.

An HTTP response profile specifies an HTTP status code and its corresponding content. The status code determines which content field is required — a redirect code takes a URL, a direct response code takes an HTML body:

Response CodeContent Type
200 OKHTML
301 Moved PermanentlyURL
302 FoundURL
303 See OtherURL
403 ForbiddenHTML
404 Not FoundHTML
451 Unavailable For Legal ReasonsHTML

The URL can be up to 2,048 characters. The HTML body must be nonempty and is limited to 8,192 UTF-8 bytes (8 KiB), which may be fewer than 8,192 characters for non-ASCII text.

The HTML body is returned as stored. Use literal content; template variables are not expanded.

<!doctype html>
<html>
  <body>
    <h1>Access denied.</h1>
    <p>Contact your IT administrator for assistance.</p>
  </body>
</html>

DNS Responses

Select a DNS response profile in a deny rule's DNS override. Its IP-protocol conditions must leave TCP or UDP possible.

A DNS response profile defines one synthetic answer:

  • Record Type — the type of record served: A, AAAA, or CNAME. TXT is not exposed.
  • Answers — one or more record values. A records require IPv4 addresses, AAAA records require IPv6 addresses, and CNAME records require exactly one FQDN answer.
  • Answers per Query — how many of the configured answers are returned in a single response. The value is 1–16 and cannot produce more answers than are configured. If omitted, all configured answers are returned, so at most 16 may be configured without this limit.
  • TTL — cache time of the record, in seconds.
  • Fallback — the error code returned when the synthetic answer cannot serve the query (for example, the query type does not match the record type).

The DNS override supplies a synthetic response: a query whose type matches the profile's record type receives the configured answers, and any other query receives the fallback code.

Fallback CodeDescription
NXDOMAINDNS query failed because the domain name queried does not exist.
SERVFAILDNS query failed because an answer cannot be provided.
REFUSEDDNS query failed because the server refused to answer due to policy.

The TTL is the cache time of the record in the requestor's cache. After you disable the rule, the block persists on the client side because the record is still cached in the requestor's cache, and the client will not query the firewall again.
To clear the client-side cache, you can use ipconfig /flushdns on Windows or dscacheutil -flushcache on macOS.

Example: The firewall acting as a DNS sinkhole for ad blocking.

  • Condition
    • Application: DNS
    • DNS QNAME: DNS block list (e.g., .doubleclick.com$, ^mail-ads.google.com$).
  • Action Parameters
    • Security action: Deny; configure the DNS response override
    • DNS Response Profile:
      • Record Type: A
      • Answers: 127.0.0.1
      • Answers per Query: 1
      • TTL: 60
      • Fallback: NXDOMAIN

Public DNS block lists are widely available. Import a list (in text format) into an FQDN object. Each plain domain name in the list blocks that domain and all of its subdomains; see FQDNs for the other formats.

Use DNS blocking with caution, depending on where the firewall is deployed. When the firewall sits between clients and the recursive server, it sees DNS queries from the clients to the recursive server. When it sits between the recursive server and authoritative servers, it sees the queries the recursive server sends on behalf of its clients. This may result in improperly blocking requests that should not be blocked.