- Arkime Architecture
Arkime Architecture
Here are some sample deployments of Arkime for different network architectures. Most folks will probably run a hybrid of the following since no one solution fits all. The ability to scale capturing can be done horizontally by adding more capture machines, vertically by adding more cpus/disk, or both. We usually recommend scaling horizontally unless physically space constrained, and using a network packet broker in front of multiple machines. However it is possible to use big machines, with lots of cpu/disk, and run arkime-capture with more threads. There is a companion video for this page.
Legend / Info
- A box represents a physical machine.
- It is possible to run multiple capture processes per machine, or have a single capture process listen to multiple interfaces - (FAQ Answer)
- Recommend “Big Data” style boxes for capture - (FAQ Answer)
- Run multiple OpenSearch/Elasticsearch processes per machine since each OpenSearch/Elasticsearch node should be configured at most to 30G - (FAQ Answer)
- Except for single host deployments, it is recommended/useful that all operator access flows through a central viewer with potentially a reverse proxy that can provide enterprise level authentication, logging, and a single choke point - (FAQ Answer)
Security
Access to Arkime is protected by using HTTPS with digest passwords, or by using an authentication‑providing web server proxy. All PCAPs are stored on the sensors and are only accessed using the Arkime interface or API.
TLS and passwords come first
- Arkime
viewershould be configured to use TLS. Edit certFile and keyFile in/opt/arkime/etc/config.inito enable it; if either is missing the viewer runs plain HTTP- It is easiest to use a single certificate with multiple DNs, or a wildcard
- Make sure you protect the cert on the filesystem with proper file permissions
- Arkime can be configured to use OpenSearch/Elasticsearch user auth or API keys - see elasticsearchBasicAuth and elasticsearchAPIKey, which keep the credentials out of the URL and so out of your logs. For TLS to the database itself see OpenSearch/Elasticsearch TLS
- Set both passwordSecret and serverSecret, and do not give them the same value. If
serverSecretis unset it falls back topasswordSecret, which ties two keys together that have different jobs and different lifetimespasswordSecretencrypts the stored user password hashes. Every Arkime application sharing a users database needs the same value, and changing it makes all existing passwords stop workingserverSecretis the server‑to‑server key. Every viewer in the cluster needs the same value, and it should be changed periodically- That is the practical reason to split them: you can rotate
serverSecreton its own schedule, but only if it is not doubling as the key your users’ passwords are encrypted with - Make sure you protect the config file on the filesystem with proper file permissions
- Encrypted password hashes are used so a new password hash cannot be inserted into OpenSearch/Elasticsearch directly, in case it has not been secured
- For large deployments it is possible to set up an Arkime
vieweron a central machine that does not capture any data, and instead gateways all UI requests- Using a reverse proxy (Caddy, Apache, …) can handle the authentication and pass the username on to Arkime; this is how we deploy it
Then lock down the network
Optional, but worth doing. Your OpenSearch/Elasticsearch holds every session Arkime has ever indexed, so this is defense in depth: it limits the damage if something above is misconfigured. Arkime machines need to reach each other on port 8005 and the OpenSearch/Elasticsearch machines on ports 9200‑920x, and the web interface needs to be reachable on port 8005.
- All OpenSearch/Elasticsearch instances should have iptables for port 9200-920N and 9300-930N, where N is the number of OpenSearch/Elasticsearch instances per machine, and only allow the other OpenSearch/Elasticsearch, capture and viewer machines to connect
- All viewer hosts, except the central viewer box, should have iptables for port 8005 and only allow other viewer machines to connect. The viewer must listen on OS interface if using multiple machines
- The shared viewer instances can listen on localhost since only reverse proxy talks to it
- esProxy can sit between capture and OpenSearch/Elasticsearch when a sensor should not be trusted with full database access
Single Host
A single host deployment should usually only be used for demos and extremely low traffic networks. The read/write patterns of Arkime vs OpenSearch/Elasticsearch will tax most systems using spinning disks and is not recommended.
Multiple Hosts Monitoring Multiple Network Segments
Multiple Hosts Monitoring High Traffic Networks
Notes
- Using a Network Packet Broker (NPB) allows traffic to be load balanced and recombined. This is especially useful in HA or asymmetric routing cases
- By using a NPB, other security devices can see the same traffic arkime sees
- When running multiple arkime-captures on the same host make sure the IO doesn’t overwhelm the disk and other subsystems.
- Use a TAP with high traffic networks since many mirror ports drop traffic under heavy load
- Operators use an apache fronted viewer (central viewer) and don’t hit the other viewers directly. The apache provides authentication.
- Lock down OpenSearch/Elasticsearch and Arkime viewer with iptables
Multiple Clusters
Notes
- It is possible to use a single OpenSearch/Elasticsearch cluster using the prefix= ini configuration
- Operator uses apache fronted viewers (central viewers) and doesn’t hit the other viewers directly. The apache provides authentication. Can use virtual paths to route to different clusters.
- NPBs are recommended for high traffic networks
Packet Portal (Sensors behind NAT)
Experimental — added in Arkime 6.7.0.
Normally the Central Viewer opens short-lived outbound connections to each Sensor’s viewer to fetch pcap, run hunts, and proxy per-node requests — which only works when the Sensor is directly reachable. A Packet Portal flips that around for edge sensors that sit behind NAT, a firewall, or an IP‑locked reverse proxy: the Sensor opens one long-lived outbound connection to the Central Viewer, and the Central Viewer sends its normal node‑to‑node requests back down that same connection. When no portal is present everything falls back to normal node‑to‑node HTTP, so the feature is purely additive.
Notes
- Use a packet portal when a Sensor’s viewer cannot be reached directly — a Sensor behind NAT or a firewall, or a Central Viewer that is fronted by a reverse proxy, uses header authentication, and is IP locked down.
- On each Sensor, set
packetPortalConnectto the Central Viewer(s) to keep an outbound portal open to. Portals reconnect automatically with backoff, and multiple Central Viewers can each reach the same Sensor. - On the Central Viewer, pick one way to accept portals: a dedicated
packetPortalPort(recommended — its own firewall rules, unaffected by the main viewer’s proxy/header auth/IP restrictions), orpacketPortalListen=trueto accept them on the existing viewer port. - Every request carried over a portal is individually S2S authenticated with
serverSecret, and the loopback address and anyuserNameHeadera request appears to carry are not trusted — so header/IP auth cannot be spoofed through a portal. - Because a Sensor names itself when it opens a portal, the Central Viewer authenticates that claim with the
[packetportal-nodes]section (per‑node password and/or source IP, falling back to[esproxy-sensors]), so one compromised Sensor cannot claim another’s node name. - See the Packet Portal settings for the full list of options.
Decrypting TLS Traffic with PolarProxy
Arkime stores and indexes whatever packets it captures, but TLS‑encrypted sessions show up as opaque ciphertext. PolarProxy (from Netresec) is a transparent TLS‑inspection proxy that sits between your users and the servers they reach: it terminates and decrypts each TLS session, re‑encrypts it on to the real server, and streams a copy of the decrypted traffic to Arkime over PCAP‑over‑IP. Arkime then indexes the plaintext just like any other capture.
How it works:
- Send client traffic through PolarProxy. Either transparently — a gateway iptables/ufw DNAT rule redirects outbound 443 to PolarProxy’s
:10443— or by pointing clients at it explicitly:iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to <polarproxy_host>:10443
Because PolarProxy is a MITM, clients must trust PolarProxy’s root CA or they will see certificate warnings. - Have PolarProxy stream decrypted packets to Arkime. Start PolarProxy with the PCAP‑over‑IP connect flag so it dials the Arkime host and sends a copy of everything it decrypts:
--pcapoveripconnect <arkime_host>:57012 - Listen for the stream on Arkime. Set
pcapReadMethod=pcap-over-ip-serverinconfig.iniso capture accepts the PCAP‑over‑IP connection on TCP 57012 (theinterfacesetting is ignored — set it todummy).
For a full, worked walk‑through see Netresec’s Capturing Decrypted TLS Traffic with Arkime.
Remote Device Capture
In some cases, it’s not practical or possible to physically co-locate a capture server near a device we want to instrument — for example a small router or appliance that can see the traffic but can’t run a full Arkime install. There are two common ways to get that remote traffic to Arkime.
Option 1 — TZSP forwarding (recommended)
The remote device captures on one of its interfaces and forwards each packet, encapsulated in TZSP, over UDP to an Arkime capture process configured with pcapReadMethod=tzsp. Nothing is stored on the device, so this works well for small appliances and routers — Arkime even ships a tiny tzsp_forwarder helper for exactly this.
- On the remote device, run the
tzsp_forwarderhelper (build it fromcontrib/tzsp_forwarder.c) pointed at the interface to monitor and the Arkime host:./tzsp_forwarder br0 <arkime_host> [<bpf_filter>] - On the Arkime capture side, set
pcapReadMethod=tzsp(theinterfacesetting is ignored — set it todummy) and capture will listen ontzspPort(UDP 37008). - For a full, worked end-to-end example — forwarding from a Ubiquiti UDR7 router into a Dockerized Arkime, plus optional HTTPS with Caddy — see Arkime on the UDR7.
Option 2 — SSH pcap streaming (not recommended)
If the device is reachable via ssh, we can log in to the remote device, start a capture, and stream the raw pcap back to an Arkime server through a UNIX pipe. One starts an Arkime capture process using the pipe as the capture interface, giving real-time capture of the remote device.
Steps:
- Create named pipe on the local capture machine, you can name whatever you want:
mkfifo /tmp/10.1.2.3-ens3 - Start capture on the local capture machine:
/opt/arkime/bin/capture --copy -r /tmp/10.1.2.3-ens3 - Use ssh to copy the data from remote to localhost machine, exclude capturing the traffic we are sending over ssh:
ssh user@10.1.2.3 sudo /usr/sbin/tcpdump -s0 -i ens3 -w - not host 192.168.10.5 > /tmp/10.1.2.3-ens3
(The sudo and full path to tcpdump might not be required, remember to update the ips.)
This is NOT the recommended way to use Arkime.