masscan: drop default rate to 1000 pps (home uplink)
All checks were successful
build-and-deploy / build (push) Successful in 1m39s
All checks were successful
build-and-deploy / build (push) Successful in 1m39s
10k pps saturated the residential link. New default is 1000 pps (~0.6 Mbps of SYNs). Live override is /etc/osint-dashboard/masscan.env.
This commit is contained in:
parent
085061492e
commit
3af9511a3a
3 changed files with 13 additions and 12 deletions
|
|
@ -32,11 +32,11 @@ SNAPSHOT_TTL_SECONDS=300
|
||||||
# Continuous rolling sweep for open RTSP port 554 across a range. Runs on the
|
# Continuous rolling sweep for open RTSP port 554 across a range. Runs on the
|
||||||
# Pi host via deploy/osint-masscan.service (needs root + raw sockets). Results
|
# Pi host via deploy/osint-masscan.service (needs root + raw sockets). Results
|
||||||
# land in the same `cameras` table as the scraper (discovery_source=masscan).
|
# land in the same `cameras` table as the scraper (discovery_source=masscan).
|
||||||
# NOTE: at a conservative 10000 pps a full 0.0.0.0/0 sweep takes ~5 days, so
|
# NOTE: 1000 pps is the residential-safe default. 10k pps saturated a home
|
||||||
# this is a continuous rolling sweep, not a daily job.
|
# uplink. A full 0.0.0.0/0 sweep at 1000 pps takes ~50 days (rolling).
|
||||||
MASSCAN_RANGE=0.0.0.0/0
|
MASSCAN_RANGE=0.0.0.0/0
|
||||||
MASSCAN_PORTS=554
|
MASSCAN_PORTS=554
|
||||||
MASSCAN_RATE=10000
|
MASSCAN_RATE=1000
|
||||||
MASSCAN_RETRIES=1
|
MASSCAN_RETRIES=1
|
||||||
MASSCAN_WAIT=0
|
MASSCAN_WAIT=0
|
||||||
MASSCAN_EXCLUDEFILE=/etc/osint-dashboard/masscan-excludes.txt
|
MASSCAN_EXCLUDEFILE=/etc/osint-dashboard/masscan-excludes.txt
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,13 @@ ETHICS / SCOPE (mirrors camera_scraper.py):
|
||||||
scanner never probes RFC1918, loopback, link-local, multicast, or the
|
scanner never probes RFC1918, loopback, link-local, multicast, or the
|
||||||
bogons. Fail closed if the excludefile is missing.
|
bogons. Fail closed if the excludefile is missing.
|
||||||
|
|
||||||
TIMING REALITY: at the default conservative rate of 10,000 pps a full IPv4
|
TIMING REALITY: at the residential-safe default of 1,000 pps a full IPv4
|
||||||
sweep (0.0.0.0/0, ~4.29B addresses) takes ~119 hours (~5 days). This is
|
sweep (0.0.0.0/0, ~4.29B addresses) takes ~50 days. This is therefore a
|
||||||
therefore a CONTINUOUS ROLLING SWEEP, not a "finish in a day" job: masscan
|
CONTINUOUS ROLLING SWEEP, not a "finish in a day" job: masscan streams
|
||||||
streams open hosts to stdout and the runner ingests them incrementally, then
|
open hosts to stdout and the runner ingests them incrementally, then
|
||||||
restarts the sweep when a pass completes. New cameras are detected as they
|
restarts the sweep when a pass completes. New cameras are detected as they
|
||||||
appear on each pass.
|
appear on each pass. 10k pps saturated a home uplink — do not raise the
|
||||||
|
rate unless you are on a VPS / unmetered link.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
@ -33,9 +34,9 @@ MASSCAN_RANGE = os.getenv("MASSCAN_RANGE", "0.0.0.0/0")
|
||||||
# Port(s) to probe. Default 554 = RTSP, the typical IP-camera port.
|
# Port(s) to probe. Default 554 = RTSP, the typical IP-camera port.
|
||||||
MASSCAN_PORTS = os.getenv("MASSCAN_PORTS", "554")
|
MASSCAN_PORTS = os.getenv("MASSCAN_PORTS", "554")
|
||||||
|
|
||||||
# Packets/sec. 10,000 = conservative, polite, residential-IP friendly
|
# Packets/sec. 1,000 is the residential-safe default — 10k pps saturated
|
||||||
# (~5 days for a full sweep). Raise carefully on a capable host/VPS.
|
# a home uplink. Raise only on a VPS / unmetered link.
|
||||||
MASSCAN_RATE = int(os.getenv("MASSCAN_RATE", "10000"))
|
MASSCAN_RATE = int(os.getenv("MASSCAN_RATE", "1000"))
|
||||||
|
|
||||||
# Retransmission count. 1 maximizes unique-host coverage at low rate; the
|
# Retransmission count. 1 maximizes unique-host coverage at low rate; the
|
||||||
# default (10) spends most of the budget re-probing the same hosts.
|
# default (10) spends most of the budget re-probing the same hosts.
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
# cat > /etc/osint-dashboard/masscan.env <<'EOF'
|
# cat > /etc/osint-dashboard/masscan.env <<'EOF'
|
||||||
# MASSCAN_RANGE=0.0.0.0/0
|
# MASSCAN_RANGE=0.0.0.0/0
|
||||||
# MASSCAN_PORTS=554
|
# MASSCAN_PORTS=554
|
||||||
# MASSCAN_RATE=10000
|
# MASSCAN_RATE=1000
|
||||||
# EOF
|
# EOF
|
||||||
#
|
#
|
||||||
# # Venv for the scanner (host-level, not the compose image):
|
# # Venv for the scanner (host-level, not the compose image):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue