Sign inSign up

hleroy/nmap-scans

By hleroy

•Updated over 6 years ago

Scan a set of servers on a regular interval and sends an email when ndiff detects a change.

Image
0

1.0K

hleroy/nmap-scans repository overview

⁠docker-nmap-scans

A simple Docker container that uses nmap to scan a set of servers on a regular interval and sends an email when ndiff detects a change.

⁠Configuration

Store configuration files in an environment file, such as /etc/default/docker-nmap-scans, Example:

# TARGETS is a space separated list of targets passed to nmap to scan and
# supports all targets that nmap supports. Required.
TARGETS=host.example.com 192.0.2.1 198.51.100.0/24

# MAILTO is the email address ndiff results are sent to. Required.
[email protected]

# INTERVAL is the runtime in seconds between scans. Required.
INTERVAL=86400

# OPTIONS is the arguments passed to nmap. Optional, defaults to '-Pn'.
# OPTIONS=-Pn -T5 -p 22,80 -oA

# SMTP configuration
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=username
SMTP_PASS=password
[email protected]

⁠Running

docker volume create nmap_results
docker run -d --restart=always -v nmap_results:/results --env-file=/etc/default/docker-nmap-scans --name=nmap-scans hleroy/nmap-scans
docker logs -f nmap-scans

⁠systemd

An example systemd service file and installation instructions. Alternative use the --restart Docker argument⁠.

cp systemd-docker-nmap-scans.service /etc/systemd/system/docker-nmap-scans.service
systemctl enable docker-nmap-scans
systemctl start docker-nmap-scans
systemctl status docker-nmap-scans

Tag summary

Content type

Image

Digest

Size

60 MB

Last updated

over 6 years ago

docker pull hleroy/nmap-scans