Zeek Network Monitoring for Traffic to Your Free /48
Disclosure up front: I run IPYE, a company that leases IP space. Most of this article is practical how-to; IPYE appears where a free /48, LOA, or ROA helps you try the work, with a short call to action at the end. An in
Disclosure up front: I run IPYE, a company that leases IP space. Most of this article is practical how-to; IPYE appears where a free /48, LOA, or ROA helps you try the work, with a short call to action at the end.
An intrusion detection system tells you about known bad patterns. Zeek takes a different approach: it watches traffic and writes structured logs of what happened, such as every connection, DNS query, TLS handshake and HTTP request, so you can answer questions later. For a network numbered from your own IPv6 prefix, where every host is directly reachable, that record is valuable. This guide sets up Zeek on the edge of a network using a free IPv6 /48 from IPYE, with 2001:db8:100::/48 as the local space.
Where to run it
Zeek needs to see traffic, not route it. The two common placements are:
- a mirror or SPAN port on the switch behind your edge router, feeding a dedicated sensor
- the edge router itself, listening on the inside interface, for small networks with modest traffic
A dedicated sensor is better once traffic grows, because Zeek's analysis uses CPU and memory that a router needs for forwarding. For a lab or small office, running it on the router's inside interface is fine.
Install
Zeek publishes packages for the major Linux distributions, and many distributions package it as well. After installation, zeekctl manages the processes and logs. Add Zeek's bin directory to your path if the package does not.
Tell Zeek which networks are yours
# etc/networks.cfg
2001:db8:100::/48 Free /48 public space
192.0.2.0/24 IPv4 lease
Zeek marks each connection endpoint as local or remote based on this file. Many scripts and reports depend on it, for example to tell inbound scans from outbound connections. Leaving it at the default, which only knows private IPv4 ranges, makes every IPv6 connection to your hosts look like remote-to-remote traffic.
Choose the interface
# etc/node.cfg
[zeek]
type=standalone
host=localhost
interface=eth1
eth1 is the mirror port or the inside interface. Disable offloading features that merge packets before Zeek sees them, since they can confuse analysis:
ethtool -K eth1 gro off lro off
Deploy
zeekctl deploy
zeekctl status
deploy checks the configuration, installs it and starts Zeek. Logs appear under the logs/current directory and rotate hourly by default into dated directories.
Read the logs
The most useful log is conn.log, one line per connection:
zeek-cut ts id.orig_h id.resp_h id.resp_p proto service duration < conn.log
zeek-cut selects fields by name. To find who connected to a particular server over the last hour:
zeek-cut id.orig_h id.resp_h id.resp_p < conn.log | grep -F "2001:db8:100:10::20" | sort | uniq -c | sort -rn | head
Other logs worth knowing on day one: dns.log for queries and answers, ssl.log for TLS server names and certificate details, http.log for plain HTTP requests, and notice.log for things Zeek's scripts consider interesting, such as scans or certificate problems.
IPv6-specific things Zeek shows you
Zeek decodes IPv6 extension headers, tunnels and ICMPv6. A few patterns to look for in a new /48:
-
neighbour discovery and router advertisements in
conn.logas ICMPv6 entries, useful when debugging a LAN with a rogue router - scans of addresses you published in DNS, which tend to arrive soon after the records go live
-
tunnelled traffic recorded in
tunnel.log, which can reveal a host using an unexpected tunnel to bypass your edge
JSON output
For shipping logs to a search system, switch to JSON:
# share/zeek/site/local.zeek
@load policy/tuning/json-logs.zeek
Run zeekctl deploy again. Each log line is then a JSON object that most log pipelines can ingest without custom parsing.
Storage and privacy
Zeek logs metadata, not full packet contents, but metadata is still sensitive: it records who talked to whom and when. Decide how long to keep logs, restrict access to the sensor, and document what is collected. Hourly rotation plus a cleanup job that deletes logs older than your retention period keeps disk usage predictable.
The network you are watching
Zeek watches traffic that reaches the /48, which first requires an announcement your upstream accepts. That means the LOA from the IPYE customer portal and the ROA that IPYE creates for the prefix.
Next step
Claim your free /48, add it to networks.cfg before the first deploy, and read a day of conn.log to learn what normal looks like on your network. Questions: [email protected].
About IPYE
IPYE (https://ipye.com) leases IPv4, IPv6 and ASN space with instant setup. Your first IPv6 /48 is free for the first year, a real allocation you can announce on your own ASN, with a LOA from the portal and the ROA created automatically. ASN and region changes apply automatically. IPv4 /24 to /22 leases include LOA, ROA and per-/24 rDNS; WHOIS is editable on IPv6 /44 and larger. Locations: Los Angeles, New York, Ashburn, Salt Lake City, London, Amsterdam, Frankfurt. Claim your free /48: https://my.ipye.com/products/ipv6-rental. Questions: [email protected].
Disclosure: I run IPYE
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.