Detecting threats in DNS, NetFlow, VPC Flow and WAF logs with OpenSearch

A practical plan for detecting network-layer threats with OpenSearch Security Analytics, covering which log types to use, how to collect high-rate data and how to keep volume manageable.

On this page

Detecting threats in DNS, NetFlow and WAF logs with OpenSearch

A security team that wants network-layer visibility in a self-hosted SIEM needs to decide which network telemetry reaches Security Analytics and how much of it the cluster can hold. This page covers using the DNS, network, NetFlow, VPC Flow, WAF and Apache access log types in Security Analytics, and planning the collection and volume work behind them. Security Analytics lists DNS, network, NetFlow, VPC Flow, WAF and Apache access logs among its standard log types (OpenSearch log types reference), so the detection content and field mappings for these sources come from the product. The collection pipelines, sizing and retention around them are planning work that your team must confirm against your own environment.

Each log type answers a different network question. DNS logs help show which hosts resolved suspicious or newly registered domains, which is often the first visible step in command-and-control or data staging. NetFlow and network logs describe who talked to whom, on which ports and in what volume, which supports lateral movement and unusual egress reviews. VPC Flow logs answer the same questions for cloud subnets and network interfaces. WAF and Apache access logs show what reached your public applications and whether requests looked like scanning, injection or credential abuse. Teams usually need this work when they have an incident that network data would have explained, when a regulator or customer asks for network monitoring evidence, or when they move workloads into cloud networks where flow data is the only record of east-west traffic.

The hard planning questions sit between the sources and the detectors. Confirm which fields each log type needs and whether your shippers emit them, because a detector cannot match a field that never arrives. Estimate event rates for flow and DNS data before you choose index layout, retention and cluster sizing, since high-rate network data is where storage and ingest costs grow fastest. Decide which volumes you will filter, sample or aggregate before ingest and which you must keep whole for forensics, and record that decision with the people who own retention. A partner or internal team can draft this plan, but the rates, retention periods and field coverage must come from your own traffic.

Which network log type fits which detection goal

This table compares the DNS, network, NetFlow, VPC Flow, WAF and Apache access log types by the detection question each answers, the source that produces the data and the main volume driver. Read each row as a starting point, then confirm field support for your version against the log types reference before you commit to a collection design. The main takeaway is that the highest-volume sources are not always the most useful for a given question.

Log typeQuestion it helps answerTypical sourceMain volume driver
DNSWhich hosts resolved suspicious or newly registered domains, and did any host query a known-bad name?Internal DNS resolvers or DNS server query logsQuery rate per host and resolver count, including automated background lookups
NetworkWhich hosts talked to which addresses and ports, and did any connection match a suspicious pattern?Firewalls, network sensors or devices that record connection eventsNumber of monitored segments and connections per second through them
NetFlowWhich flows crossed a boundary, how much data moved and between which endpoints over time?Routers, switches or sensors that export flow recordsFlow export rate, sampling settings and the number of exporting devices
VPC FlowWhich cloud network interfaces accepted or rejected traffic, and did traffic reach unexpected destinations?Cloud provider flow logging on VPCs, subnets or network interfacesNumber of network interfaces, traffic volume and the chosen capture scope
WAFWhich requests were blocked or allowed at the web edge, and are there injection or scanning patterns?Web application firewall request and action logsRequest rate to protected applications and whether all requests or only matches are logged
Apache accessWhich requests reached the web server, with what status codes, paths and client addresses?Apache HTTP Server access logs on web serversRequest rate per server and the log format and fields configured

Collection pipelines for high-rate network data

Network logs arrive from sensors, exporters and cloud services at rates that can outrun a single shipper or index. Each stage in the path, from the point that emits a record to the index that stores it, forces a decision about where data is filtered, normalized and kept. Settle these before the first detector runs, because changing them later means reprocessing history.

Sensors and exporters

DNS resolvers, flow exporters, WAF and load balancer logs and web servers each produce records at different granularity. Decide whether to log every DNS query or only responses, whether NetFlow records are sampled at the exporter, and which WAF actions (allow, block, count) are emitted. Sampling and verbosity set the ceiling for everything downstream, so confirm them with the team that owns each source before ingestion is sized.

Agents and shippers

An agent on the host or a shipper pulling from a cloud bucket handles buffering, batching and retry when the cluster slows or refuses writes. Check how the collector behaves when the destination is unavailable, whether it can resume without duplicating or losing records, and how it authenticates to the cluster. Confirm the supported options with OpenSearch's current documentation before selecting one, and test with a realistic burst rate.

Filtering before the index

Dropping low-value records early, such as repetitive health checks, internal DNS to known-good zones or allowed traffic from trusted subnets, reduces storage and indexing cost. The risk is that a filter removes the exact events a future investigation needs. Record each filter as a documented rule with an owner, and keep a sampled raw copy in cheaper storage so detections can be backtested against what was dropped.

Normalization and field mapping

Security Analytics detectors match on the fields of a standard log type, so a DNS query field that is named differently in your sensor will not match a rule. Decide where renaming happens: in the shipper, in an ingest pipeline, or in the source configuration. Keep one mapping owner per log type, and check that timestamps, client IP fields and query names are parsed consistently across sources before tuning rules.

Index design and retention

One index per log type with a time-based rollover keeps detector queries bounded and lets old data age out. Shard count and replica settings should follow expected daily volume and the cluster's node count, and replicas should sit on separate nodes. Retention differs by type: flow data is often kept for shorter windows than WAF events used in investigations. Agree these windows with the incident response and compliance owners before the first index is created.

Backpressure and capacity checks

When a burst fills write queues, the pipeline either slows the sources, buffers them or drops records. Test this path under peak load: measure ingest latency, watch for rejected writes and confirm that detector schedules still complete while indexing runs. Set disk watermarks and alerts so the cluster stops accepting writes before it becomes unhealthy. Document what happens to the sensor when the pipeline is backed up.

How to set up network log detection step by step

This sequence takes network-layer logs from an inventory of sources to a tuned set of detectors that produce alerts your team can act on. Each step ends with a check you can run in your own environment before moving on.

  1. Inventory log sources and retention needs

    Start by listing every source that emits DNS, NetFlow, VPC Flow, WAF and Apache access logs, including the resolvers, border or cloud flow exporters, load balancers and web servers that produce them. For each source, record the owning team, the expected event rate, the fields it emits and how long your policy and investigations require the data to be kept. Your security lead and the team that owns each source should sign off on the list. The step is done when every source has an owner, a rate estimate from its operator, and a retention period written in the scope document.

  2. Map each source to a Security Analytics log type

    Match each inventoried source to a standard log type in Security Analytics: DNS, network, NetFlow, VPC Flow, WAF or Apache access. Check the OpenSearch log types reference for the fields each type expects, and note any source that does not fit a standard type, since those will need a custom log type later. Record the mapping in a table that pairs source, log type, index name and collector. The step is done when every source maps to exactly one log type or is flagged as a custom case, and a second engineer has reviewed the table.

  3. Build and test the collection pipeline

    Configure the agent or pipeline that ships each source's logs into the index pattern for its log type, with TLS between the shipper and the cluster and credentials held in your secrets store. Send a controlled batch of known test events, such as a DNS lookup for a test domain or a request to a test WAF path, and confirm the events arrive in the expected index with timestamps in the correct time zone. Also check that the pipeline drops nothing under a short burst. The step is done when the test events appear in OpenSearch within the window your team has defined, with no parse errors in the pipeline logs.

  4. Validate field mappings with sample events

    Compare the fields in the arriving events against the field names the log type and its rules expect. Look for mismatched names, wrong data types such as strings stored as text instead of keywords or IP addresses stored as strings, and fields that are empty because the parser did not run. Fix the pipeline or mapping, then re-send the same sample events and confirm the output matches. Keep the sample set in version control so the check can be repeated after upgrades. The step is done when every field a rule depends on is populated and typed correctly in the sample events.

  5. Enable detectors and confirm they match test events

    Turn on the detectors for each log type, selecting the rule set that applies, such as the prepackaged Sigma rules for DNS, network or WAF activity. Replay or inject sample malicious and benign events, for example queries to a known test indicator or requests containing a common attack string, and confirm that each expected rule fires once and benign traffic does not trigger it. Record the detector schedule and the alert destination. The step is done when each enabled detector has a documented test result showing both a true positive and a clean negative.

  6. Tune noisy rules against production volume

    Run the detectors against live traffic for a period your team sets, then review which rules fire most often and why. For recurring false positives, narrow the rule with an allowlist, a field condition or a filter on the source, and document the reason for each change. For high-volume log types such as flow records, check whether the detector schedule and the cluster load stay within the limits you planned in the inventory step. The step is done when each rule's alert rate has been reviewed and every change has a recorded reason and owner.

  7. Review alert volume and handoff to triage

    Summarize alert counts by log type, rule and source over the tuning period, and agree with the SOC on which alerts are routed to triage and which are kept as informational. Confirm that alerts reach the notification channel, that each one carries the source, the rule name and the raw event reference needed for investigation, and that the retention settings from the first step apply to the findings. Schedule a recurring review of volume and rule changes. The step is done when the SOC lead has accepted the alert routing in writing and the recurring review has an owner.

How to keep high-rate network data affordable

Volume is the main cost driver in network-layer detection, and it is set by a few sources you can choose and tune before anything is indexed. DNS query logs grow with the number of hosts, resolvers and client behavior, so a busy internal resolver can produce far more events than the rest of the estate combined. NetFlow and VPC Flow records grow with traffic, and flow sampling rates change how many records each link produces. WAF logs grow with request volume, and a public application under scanning can multiply them within hours. Before you size anything, measure events per second and bytes per day for each source over a representative period, including a peak, and record those numbers as the baseline for capacity planning.

The controls that reduce load act at three points. At the collection pipeline, drop or sample low-value events, such as repeated identical DNS answers from known internal resolvers or health-check requests on WAF rules, and keep the filter logic under change control so a detection gap is visible in review. At the source selection step, decide which log types feed detection at all: the Security Analytics log types for DNS, network, NetFlow, VPC Flow, WAF and Apache access logs are separate choices, and a source that no enabled detector reads adds cost without adding coverage. At retention, set separate windows for raw events and for alert or finding records, and confirm with your analysts how far back investigations usually need to go. Any retention period should come from your own incident history and compliance obligations, not from a default.

Storage and node capacity follow from those measurements. The OpenSearch cluster docs describe dedicated cluster manager nodes, replicas on separate nodes and shard allocation awareness, and they also set the data and ingest roles that absorb this load. Shard count is the setting most often sized wrong for time-based network indices: too many small daily indices strain the cluster manager, while very large shards slow recovery. Ask your implementation partner to show the shard and replica math against your measured rates, the number of data nodes that results, and the disk headroom left after replicas. Confirm these figures in a test cluster with production-like volume before you commit to hardware or cloud instance sizes.

How network logs flow from sources to detectors and alerts

The diagram starts at the sources that emit network telemetry: DNS resolvers, flow exporters, cloud flow logs, WAFs and Apache servers. Those logs cross the trust boundary into a collection and ingest layer, which normalizes them into OpenSearch indices that Security Analytics detectors read on a schedule. Check the boundary first: confirm what leaves your network, how it is encrypted and authenticated, and which team owns each hand-off before you tune any rule.

Network log sources, collection, indices, detectors and alerts, with the trust boundary marked.

Security and access controls for network telemetry

DNS, flow and WAF logs reveal which hosts talk to which destinations and what users request, so they need the same protection as the detections built on them. The cards below cover who can read the data, how it moves, who can change detectors and how those changes are recorded. Confirm each control against your own cluster version and identity setup before you rely on it.

Classify network telemetry before onboarding

DNS queries, NetFlow records, VPC Flow Logs and WAF events can expose internal hostnames, service topology, user browsing patterns and customer request content. Before ingestion, agree a data classification with your privacy and legal teams and decide which fields are necessary for detection. Record the retention period and the owner of each index so that the access model in the cards that follow has something concrete to enforce. Confirm the classification with your data protection officer, since the answer changes which roles can see raw fields.

Role-based access to detection content

Use the OpenSearch Security plugin's role-based access control to separate people who read findings from people who write or disable detectors. An analyst role can usually query alerts and indices, while a detection engineering role manages rules and detectors and an administrator role manages cluster settings. Map these roles to your identity provider groups so that offboarding removes access in one place. Test each role with a non-privileged account before go-live, because broad index patterns often grant more than intended.

OpenSearch security docs

Document and field-level restrictions

Some telemetry fields, such as full DNS query names or WAF request bodies, may be needed by a few responders but not by everyone on the SOC. The Security plugin offers document-level and field-level security and field masking, which can hide or obscure specific fields from roles that should not see them. Decide which fields are sensitive before you write the roles, because masking applied late can leave raw values in saved searches and dashboards. Confirm how masked fields behave in Security Analytics views and alert notifications on your version.

TLS on collection and cluster paths

Log shippers, collectors and Dashboards connect to the cluster across networks where flow and DNS data may travel. Enable TLS for node and client traffic so that events are encrypted between the collector, the cluster nodes and the browser sessions used by analysts. Plan certificate issuance, distribution to every collector and a rotation schedule before the first pipeline goes live. Confirm which certificate authority your environment requires and whether your collectors support the chosen TLS settings.

OpenSearch security docs

Authentication for analysts and pipelines

Human analysts should sign in through your central identity provider using a supported backend such as SAML, OpenID Connect or LDAP, while log pipelines should authenticate with dedicated service accounts. Separate service credentials per source, store them in your secrets manager and restrict them to write only to their own index patterns. This limits the damage if a collector host is compromised. Confirm the backend your identity team supports and whether multi-factor authentication is enforced at the identity provider rather than the cluster.

Audit logging of detector changes

A detection that is disabled or edited without a record can hide an attack for weeks. Enable the Security plugin's audit logs and send them to a store that detection engineers cannot modify, so that changes to roles, detectors, rules and index patterns are traceable to a user and time. Review audit output as part of your change process and compare it with the rule history in your version control. Confirm which audit categories your version records and how long your retention policy keeps them.

OpenSearch security docs

Questions teams ask before detecting network threats in OpenSearch

What does it cost to detect threats in DNS, NetFlow, VPC Flow and WAF logs with OpenSearch?

The software is free to use under the Apache License, Version 2.0, so the cost is the work and the infrastructure around it. The OpenSearch FAQ does not describe a paid edition, so you will not pay a license fee for the core product. Your costs fall into four groups: the cluster hardware or cloud capacity that stores and searches the logs, the engineering time to collect and parse each log type, the time to write and tune detection rules, and the services you buy if a partner does part of the work. Most of the recurring cost is storage and compute, which grows with traffic rate and retention. Ask any partner for a quote built from a written scope that lists the log types, sources, retention period and hosting location. DeployOpen does not publish a price list, and a quote follows from that scope.

How long does a network log detection project take?

The duration depends on how many log sources you onboard, how clean the data is when it arrives, and how many detectors you tune before they go into daily use. Network data often needs the most time at the collection stage, because DNS resolver output, flow exports, VPC Flow Logs, WAF events and Apache access logs each use different formats and fields. Tuning is also iterative: a first run of a rule against real traffic usually produces noise that must be reviewed before anyone trusts the alerts. No duration is given here because none is supplied for this topic. Ask for a timeline that separates collection, field mapping, rule selection, tuning and handover, and that states which of these depends on your own change approvals.

How many log sources and how much traffic change the effort?

Effort rises with the number of distinct log types and sources, and with the rate at which they produce events. Each source adds a collection path, a field mapping check and a set of detectors that must be validated against it. Rate matters because high-volume network data increases indexing load, storage use and query time, and a detector that runs on a short schedule over a large index can slow the cluster. Ask your team or partner to count sources by type (DNS, network, NetFlow, VPC Flow, WAF, Apache access), to estimate events per second per source from your own measurements, and to plan which sources need sampling, filtering or a separate index before collection starts.

How does retention affect cost and detection quality?

Retention decides how far back your detectors and investigators can look, and it is usually the largest recurring cost after compute. Longer retention means more disk, more snapshot storage and more index management work. Shorter retention lowers cost but can remove the history needed to spot slow data exfiltration or a DNS beacon that runs for weeks. Decide retention per log type, not for the whole cluster. For example, WAF events used for active blocking may need a shorter window than DNS logs kept for investigation. Confirm the retention period with your compliance owner and the storage and snapshot approach with your platform team before sizing the cluster.

What does the work need from our team?

You need named owners for four things: access to the log sources and their export settings, a place to run the cluster that meets your hosting and network rules, decisions on which detections matter to your business, and someone who triages the alerts after go-live. Collection work needs the people who administer DNS resolvers, firewalls, cloud accounts and web servers, because those teams control what is logged and how it leaves the system. Detection tuning needs someone who knows which traffic is normal for your applications. Ask for a list of these people and their time commitment in the written scope, so the work does not stall waiting for access.

Can our in-house team build this without a partner?

Yes, a capable in-house team can build it, and the OpenSearch project documentation covers installation, security configuration and Security Analytics. The main question is capacity and experience with high-rate network data. Teams that already run OpenSearch or Elasticsearch clusters, know their DNS, firewall and cloud logging, and can staff tuning and alert triage usually need less outside help. Teams without those skills tend to underestimate parsing work and noisy-rule tuning. A practical approach is to run an internal pilot on one or two log types, measure the volume and alert quality, and then decide whether to extend in-house or bring in a partner for the remaining sources.

What goes wrong when network logs are not planned up front?

The most common failures are missing or inconsistent fields, collection gaps, and clusters that fill up. If DNS, flow and WAF logs use different timestamp formats or identifiers, correlation fails and detectors either miss events or fire on bad data. If collection stops silently after a firewall or cloud change, the detectors keep running but see nothing. High volume without filtering or index planning can fill disks and slow searches during an incident, which is the worst time for it. Before go-live, confirm that each source reports events, that timestamps are consistent, that disk and index limits are set, and that someone is alerted when a log source stops sending.

Does DeployOpen guarantee that these detections will catch attacks?

No engagement can guarantee that a detection will catch every attack, and DeployOpen does not offer guarantees of that kind. What a written scope can define is the log sources included, the collection and parsing work, the detections selected and tuned, the testing performed and the handover material. DeployOpen implements and tests open-source platforms inside the client's infrastructure, and runs security testing that can show whether detections fire on defined test activity. Ask any provider to show the test cases it will run against your sources and what evidence you receive at handover.

How DeployOpen scopes and delivers network log detection

DeployOpen plans DNS, NetFlow, VPC Flow and WAF detection as a fixed-scope engagement in infrastructure you control. The work starts with the log sources you have, the detections you need and the volume you expect, then moves through build, testing, handover and optional ongoing support.

How we scope

  • Inventory which network log types you can collect, such as DNS, NetFlow, VPC Flow, WAF and Apache access logs.
  • Agree in writing which collection pipelines, detectors, rules and dashboards are in the engagement.
  • Record expected event rates, retention periods and storage limits so volume planning is part of the quote.

How we build

  • Configure the log type mappings and collection path for each source in your own cluster and network.
  • Import or adjust detection rules and detector schedules, and test each one against sample traffic from your environment.
  • Set up filtering and sampling at the collector for high-rate sources, and document what is dropped and why.

How we hand over

  • Deliver a written record of log sources, field mappings, detector settings and access roles for your review.
  • Walk your security and platform engineers through alert triage for network detections and the known false-positive patterns.
  • Provide tested runbooks for collector restarts, index retention changes and detector tuning.

How we support

  • Engagements are fixed-scope, so changes after handover are scoped and priced separately in writing.
  • Ongoing support, rule updates and continuous testing are available as a retainer.
  • Ask us to confirm how your team will receive OpenSearch upgrade and maintenance support before the build begins.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.