Network and identity intelligence
Anubis turns client addresses and host names into signals that policy rules can use to classify traffic. The signals cover network ownership and location, DNS relationships, and external reputation. These signals can change a request's weight, select a challenge, allow traffic, or deny it.
Signal pipeline
The network intelligence path connects request identity to policy evaluation. Address data is enriched when policy configuration needs it, while DNS and reputation checks can run during request handling.
The following diagram shows how a client address becomes policy input and then a protection result.
flowchart LR
A[Client address and host data] --> B[GeoIP enrichment]
A --> C[DNS lookups and validation]
A --> D[Blocklist reputation]
B --> E[Policy checkers and expressions]
C --> E
D --> F[Request gate]
E --> G[Allow, challenge, or deny]
F --> G
GeoIP data supplies stable context such as an autonomous system number (ASN) or country. DNS supplies names and address relationships. A DNS blocklist (DNSBL) supplies a reputation result for known abusive address classes. Policy evaluation combines these results with other request signals rather than treating any one source as a complete identity.
References: lib/…/policy.go• L80-149 lib/…/policy.go• L208-233 lib/anubis.go• L330-359
GeoIP enrichment
GeoIP enrichment maps a public IP address to network ownership and geographic context. An ASN identifies the network that announces the address, while a country code identifies the configured country view for that address.
The enrichment is available to policy rules and can also attach ASN data to request logs and metrics. A policy can therefore use network or country context as a signal without making a live lookup for every request.
For the database lifecycle and compatibility rules, see GeoIP enrichment and database updates. For policy-facing use, the main choices are:
- ASN matching for network-specific treatment.
- Country matching for location-based treatment.
- Optional ASN association with request logs and metrics.
References: lib/…/geoip.go• L30-44 lib/…/geoip.go• L164-235 lib/anubis.go• L114-129 lib/…/geoip.go• L16-35
DNS and host relationships
DNS signals test the relationship between addresses and names. Reverse lookup returns names for an address. Forward lookup returns addresses for a name. Forward-confirmed reverse DNS (FCrDNS) accepts a name only when a forward lookup returns the original address.
Policy expressions can request these signals through reverseDNS, lookupHost, and verifyFCrDNS. DNS results use shared cached state, so repeated policy checks do not need to repeat the same network query within the cache lifetime. A missing DNS record is represented as no result; other lookup failures remain a failed lookup and do not become positive identity proof.
See DNS, reputation, and service signals for the wider DNS and reputation flow.
References: internal/…/dns.go• L20-31 internal/…/dns.go• L34-85 internal/…/dns.go• L88-149 lib/…/environment.go• L61-148 lib/…/policy.go• L147-149
Reputation signals
Reputation signals identify addresses that an external source associates with abusive activity. The DNSBL check queries DroneBL and returns a category such as an open proxy, a brute-force attacker, or a known drone.
When DNSBL protection is enabled, Anubis checks the client address before it passes the request to the next stage. A clean result allows normal processing. A listed result produces the configured deny response. A lookup error produces a temporary service-unavailable response rather than silently treating an unknown result as clean.
Results are stored for a limited time. This reduces repeated external lookups while allowing a later request to recover after a transient lookup failure. See DNS, reputation, and service signals for blocklists, address lists, and service-related signals.
References: internal/…/dnsbl.go• L12-30 internal/…/dnsbl.go• L68-101 lib/anubis.go• L490-519 lib/dnsbl_regression_test.go• L11-63
Policy integration
Network intelligence enters policy evaluation as checker input or as a function available to a policy expression. Checkers are combined with AND semantics, so a rule matches only when all of its configured checks pass. The rule's action then determines whether the request is allowed, challenged, denied, or assigned another policy result.
The policy parser also validates that a required GeoIP source exists. If a rule asks for ASN or country data without the matching database, Anubis warns and skips that checker instead of inventing a signal. This keeps missing enrichment distinct from a positive match.
Network signals can affect both the immediate request decision and later observability. For example, ASN context can label request logs and policy metrics, while a DNSBL hit can stop the request before challenge or upstream handling.
References: lib/…/checker.go• L12-44 lib/…/policy.go• L217-233 lib/anubis.go• L114-129 lib/anubis.go• L345-359
Signal boundaries
Each signal answers a different question, so policy authors must keep their meanings separate:
| Signal | Main question | Typical policy use |
|---|---|---|
| ASN | Which announced network owns the address? | Apply network-specific weight or challenge rules |
| Country | Which country view is associated with the address? | Apply location-based policy |
| Reverse DNS | Which names point from the address? | Inspect host naming signals |
| FCrDNS | Does a name point back to the same address? | Require a two-way DNS relationship |
| DNSBL | Does an external abuse list classify the address? | Stop or restrict known abusive sources |
These sources are evidence, not user identity. A missing record, a stale database, or a failed external query can reduce the available signal. Policies should use the result that matches the decision they need to make.
References: lib/…/geoip.go• L174-235 internal/…/dns.go• L34-149 internal/…/dnsbl.go• L68-101
Change checklist
When these files or sections are changed, remember to consider these:
- Keep GeoIP database availability aligned with every ASN or country checker that policy parsing can create.
- Keep the client address used by GeoIP, DNSBL, and request logging aligned with the trusted proxy address path.
- Preserve the distinction between a clean reputation result, a listed result, and an unavailable reputation service.
- Keep DNS cache lifetime settings aligned with the expected freshness of policy decisions.
- Update the child pages when a signal changes its meaning or its failure behavior.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A policy needs ASN or country data but its matching GeoIP database is absent | The related checker is skipped and the rule may not provide the intended signal | Configure the required database and review the parser warning |
| A DNSBL lookup fails | Anubis returns service unavailable for the protected request | Restore DNS access or allow the cached result to expire and retry |
| An address has no public ASN or country record | GeoIP enrichment returns no match | Treat missing enrichment as unknown rather than as a positive match |
| FCrDNS has no PTR record or its forward lookup does not return the original address | The FCrDNS signal is false when a name or confirmation is required | Use a name that has matching reverse and forward records |
Key files
| File | Why to read it |
|---|---|
| lib/…/policy.go | Shows how GeoIP and DNS services become policy inputs during configuration. |
| lib/anubis.go | Shows where ASN context is attached and where DNSBL can stop a request. |
| lib/…/geoip.go | Defines the address-to-ASN and address-to-country enrichment boundary. |
| internal/…/dns.go | Defines reverse DNS, forward DNS, and FCrDNS behavior. |
| internal/…/dnsbl.go | Defines external blocklist categories and lookup results. |
| lib/…/environment.go | Shows the DNS signals exposed to policy expressions. |
| docs/geoip-enrichment.md | Child page for GeoIP data loading and updates. |
| docs/dns-and-reputation-signals.md | Child page for DNS, blocklist, and service signals. |