Skip to content

Commit

Permalink
Use live capture mode by default
Browse files Browse the repository at this point in the history
  • Loading branch information
aiooss-anssi committed Jul 23, 2024
1 parent 0b4d524 commit ca88dc7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ This is fine, but it might add some delay before observing new flows.

You may launch Suricata then the web application using the following:
```bash
# Start Suricata
./suricata/entrypoint.sh -r input_pcaps --pcap-file-continuous
# Option A: capture device (fast, for live analysis)
sudo ./suricata/entrypoint.sh -i tun5

# Option B: pcap read mode (slower, for archives replay)
./suricata/entrypoint.sh -r input_pcaps
```

```bash
Expand Down
14 changes: 11 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@ services:
- "./input_pcaps:/input_pcaps:ro"
- "./suricata/rules:/suricata/rules:ro"
- "./suricata/output:/suricata/output:rw"
# Remove `--pcap-file-continuous` to see the last few flows, else Suricata
# will wait for new pcap before logging them.
command: -r /input_pcaps --pcap-file-continuous

# Option A: capture device (fast, for live analysis)
# Drastically reduces ingest delay, but requires access to an interface.
command: -i tun5
cap_add:
- NET_ADMIN
network_mode: "host"

# Option B: pcap read mode (slower, for archives replay)
# Add `--pcap-file-continuous` to watch for new pcap in folder.
#command: -r /input_pcaps --pcap-file-continuous

webapp:
build: ./webapp
Expand Down

0 comments on commit ca88dc7

Please sign in to comment.