Git Product home page Git Product logo

docker-nmap-scans's Introduction

Introduction

A simple Docker container that will 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/sysconfig/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

# TZ is the timezone. Optional.
# TZ=Australia/Adelaide

# BASE_DIR is used by systemd service file and represents path this repo without
# trailing spaces. Required for sample systemd service file, otherwise ignored.
# BASE_DIR=/home/user/dockers/nmap-scans

Running

docker run -d --restart=on-failure -v /base_dir/scripts:/scripts -v /base_dir/results:/results --env-file=/etc/sysconfig/docker-nmap-scans --name=nmap-scans 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

docker-nmap-scans's People

Contributors

bradleyfalzon avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.