5G -and beyond- networks provide a strong foundation for EU’s digital transformation and are becoming one of the Union’s key assets to compete in the global market.
Securing 5G networks and the services running on top of them requires high quality technical security solutions and also strong collaboration at the operational level.
This is a Docker image for Snort, a popular open-source network intrusion detection system (NIDS) and Intrusion Prevention System. This image is designed to be easy to use and configure, allowing you to quickly set up Snort in a Docker container.
It is build from sources and releases of the tool snort, and has some added functionalities.
The current image on dockerhub is of snort v3.9.1.0
docker compose up
services:
snort3:
image: snort-docker-sand5g-modified:latest
hostname: snort3
network_mode: "host"
cap_add:
- NET_ADMIN
- NET_RAW
volumes:
- custom_data:/home/snorty/custom
- alerts_data:/home/snorty/alerts
- /etc/localtime:/etc/localtime:ro
environment:
- TZ=Europe/Athens
- RULES_FILE=/home/snorty/custom/custom_alert_drop_block.rules
- INTERFACE=ens3
- VERBOSE=1
- SNORT_ALERT_MODE=alert_json
- SNORT_DAQ_MODE=nfq
- INTERFACE=ens3
privileged: true
stdin_open: true
tty: true
restart: unless-stopped
volumes:
alerts_data:
driver: local
driver_opts:
type: none
o: bind
device: ./volumes/alerts
custom_data:
driver: local
driver_opts:
type: none
o: bind
device: ./volumes/custom
| Variable | Required | Default Value | Description |
|---|---|---|---|
| RULES_FILE | OPTIONAL | /home/snorty/custom/local.rules | Which rule file to use |
| SNORT_CONF_FILE | OPTIONAL | /home/snorty/custom/custom_snort.lua | Which configuration file to use |
| SNORT_ALERTS | YES | /home/snorty/alerts | Which folder to use for alert output |
| TZ | YES | Europe/Athens | Used to have accurate timestamps |
| INTERFACE | YES | <> | The interface to monitor. |
| Default is the first interface available in the system | |||
| VERBOSE | OPTIONAL | 0 | The verbosity level of the snort output. ( 0 or 1 ) |
| SNORT_ALERT_MODE | OPTIONAL | The format of Snort alerts (options come from snort tool) | |
| SNORT_DAQ_MODE | OPTIONAL | The Snort DAQ mode to use (nfq or afpackets) |
The container is running the snort command that is being build from the docker-compose environmental variables and the Dockerfile. You can find the source code in github/ISSG-UPAT/Snort-Docker-SAND5G
The afpackets DAQ mode has not been tested and is not guaranteed to work.
The nfq DAQ mode has been tested. It puts the snort in inline mode, and can alert, drop and block the traffic based on the rules provided in the $RULES_FILE.
Inside the snort.lua conf daq is not set.
To build the Docker image, you can use the Dockerfile inside the src directory and the Makefile.
There are two Dockerfiles. Since building from releases takes a lot of time, the Dockerfile-modified is an image you can use when you want to test out small changes to the Dockerfile.
More information about the Makefile can be found in the Makefile.
This project is licensed under the MIT License. See the LICENSE file for details.
Content type
Image
Digest
sha256:fa1e3a2ce…
Size
1.3 GB
Last updated
3 months ago
docker pull issgupat/snort-docker-sand5g