Live network packet capture and firewall threat-log visualization with animated geographic connections. Supports live packet capture, PCAP file replay, Cisco FTD IPS/Security Intelligence syslog, and Palo Alto NGFW Threat CSV exports.
- Ubuntu Server 24.04 LTS
- A user account with
sudoprivileges - Internet access
sudo apt update && sudo apt upgrade -ycurl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejsVerify the installation:
node -v
npm -vThe pcap npm package requires libpcap development headers and a C++ build toolchain:
sudo apt install -y build-essential libpcap-dev python3git clone <your-repo-url> /opt/pew-map
cd /opt/pew-mapReplace
<your-repo-url>with the actual Git remote URL, or copy the project files manually.
npm installnpm run buildThis compiles the React/Vite frontend into the dist/ directory, which the Express server serves automatically.
cp .env.example .env
nano .envAdjust the values to match your server's location:
PORT=3000
# Home Location (for private/RFC1918 IP addresses)
# Find coordinates at: https://www.latlong.net/
HOME_LATITUDE=37.7749
HOME_LONGITUDE=-122.4194
HOME_CITY=San Francisco
HOME_STATE=CA
HOME_COUNTRY=US
By default, raw packet capture requires root. To allow Node.js to capture packets as a regular user, grant the cap_net_raw capability:
sudo setcap cap_net_raw+ep $(which node)Note: This must be re-applied after any Node.js update.
sudo npm startVisit http://<your-server-ip>:3000 in a browser. You should see the map interface and be able to select a network interface to begin capturing.
Press Ctrl+C to stop.
If UFW is enabled, allow the application port and syslog reception:
sudo ufw allow 3000/tcp # Web UI
sudo ufw allow 514/udp # Syslog UDP
sudo ufw allow 514/tcp # Syslog TCPOr, if you plan to reverse-proxy behind Nginx on port 80/443, allow HTTP/HTTPS instead:
sudo ufw allow 'Nginx Full'Note: If you use a custom syslog port (e.g. 5514), open that port instead of 514.
Install Nginx:
sudo apt install -y nginxCreate a site configuration:
sudo nano /etc/nginx/sites-available/pew-mapserver {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}Enable the site and restart Nginx:
sudo ln -s /etc/nginx/sites-available/pew-map /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginxThe
UpgradeandConnectionheaders are required for WebSocket support.
pew-map can ingest syslog events from Cisco Firepower Threat Defense (FTD) devices and visualize malicious connections on the map in real time.
- 430001 — Intrusion (IPS) events
- 430002 — Security Intelligence (SI) events
All other syslog message types (e.g. 430003 connection events) are ignored.
| Mode | Description |
|---|---|
| Syslog File (IPS/SI) | Load a JSON file containing an array of syslog strings for replay |
| Live Syslog Receiver (IPS/SI) | Start a UDP+TCP syslog server to receive events in real time |
| Palo Alto NGFW Threat CSV | Stream and replay a Palo Alto Threat log CSV export without loading the entire export into memory |
- In FMC, navigate to Devices > Platform Settings > Syslog
- Add a syslog server pointing to
<pew-map-server-ip>on port514(or your custom port) - Ensure IPS and SI event logging is enabled under Policies > Intrusion / Access Control
- Deploy changes to the FTD
Connections are colored based on threat severity:
- Security Intelligence events — colored by
IP_ReputationSI_Category(Malicious = red, Botnet/CnC = orange-red, Phishing = orange, Tor/Proxy = yellow-orange) - Intrusion events — colored by
PriorityID(1 = critical/red, 2 = high/orange, 3 = medium/yellow, 4 = low, 5 = info)
If the ResponderIP is one of the following Cisco Umbrella/OpenDNS addresses, the connection is treated as originating from the local network:
208.67.222.222,208.67.220.2202620:119:35::35,2620:119:53::53
Private (RFC 1918) IPs are mapped to your configured home location. Internal-to-internal connections are ignored.
An example file is included at examples/ftd-syslog-ips.json. It contains a JSON array of raw syslog strings:
[
"2026-02-09T18:11:48Z FTD1 %FTD-1-430002: {\"EventPriority\":\"High\", ...}",
"2026-02-09T17:35:19Z FTD1 %FTD-1-430001: {\"PriorityID\":3, ...}"
]Select Palo Alto NGFW Threat CSV in the data-source menu, then enter the path to a Threat log export such as firewall_threat_2026-08-02-23-09-07_502cac0393ff.csv.
The parser uses the standard export columns:
Time Generated,Severity,Subtype, andThreat Name Firewallfor the displayed threat metadataSource AddressandDestination Addressfor map endpointsApplicationto infer TCP/UDP when possibleThreat Category,Action, andRulefor feed badges and context
CSV rows are streamed in accelerated batches, including quoted fields with commas. The parser yields every 250 rows to keep WebSocket delivery and the map responsive; it does not preserve the original event timing. Critical, High, Medium, Low, and Informational severities receive threat colors. A private endpoint is placed at the configured home location; a row with two private endpoints is skipped because it has no geographic route to draw.
This mode reads exported CSV files only. It does not accept raw, live Palo Alto syslog messages.
Palo Alto CSV and FTD syslog modes do not require the native pcap binding. If packet capture is unavailable, the server still starts and these log sources remain usable; only Live Capture and PCAP File sources report a packet-capture availability error.
FTD and Palo Alto threat-log events whose destination is 172.16.16.16 or 172.16.16.17 are excluded before map processing.
Informational Palo Alto Threat rows whose Threat Category is info-leak or unknown are also excluded before map processing. Severity and category matching are case-insensitive.
See the Palo Alto CSV field mapping for the precise normalized fields.
Error: No network interface available— Ensure libpcap is installed and the user has permission to capture packets (see Step 8).Cannot find module 'pcap'— The native addon failed to build. Verifybuild-essentialandlibpcap-devare installed, then re-runnpm install.- Frontend shows a blank page — Make sure you ran
npm run buildso thedist/directory exists. - WebSocket connection fails behind Nginx — Confirm the
UpgradeandConnectionproxy headers are set in the Nginx config. - Syslog events not appearing — Verify the FTD is sending to the correct IP/port. Test with
sudo tcpdump -i any port 514 -Ato confirm traffic is arriving. EACCESerror on port 514 — Ports below 1024 require root. Either run withsudo npm startor use a port above 1024 (e.g. 5514) and update the FTD config to match.- Only seeing some syslog events — pew-map only processes 430001 (IPS) and 430002 (SI) events. Connection events (430003) and other types are intentionally filtered out.
- Palo Alto rows are not appearing — Select the Palo Alto CSV source, not an FTD syslog source, and confirm the export contains
Source Address,Destination Address, andSeverity. Rows with two private addresses are intentionally skipped.