Public Repository

Last pushed: 9 months ago
Short Description
clamav-daemon+squid3+dansguardian
Full Description

Пример dansguardian.service unit для fleetctl:

[Unit]
Description=dansguardian
After=flanneld.service
Requires=flanneld.service

[Service]
ExecStartPre=-/usr/bin/docker volume create --name dansguardian
ExecStartPre=-/usr/bin/docker volume create --name logs
ExecStartPre=-/usr/bin/docker volume create --name clambase
ExecStartPre=-/usr/bin/docker volume create --name squidcache

ExecStartPre=-/usr/bin/docker exec dansguardian freshclam
ExecStartPre=-/usr/bin/wget -P /var/lib/docker/volumes/dansguardian/_data/ -N http://www.shallalist.de/Downloads/shallalist.tar.gz
ExecStartPre=-/usr/bin/tar -zxf /var/lib/docker/volumes/dansguardian/_data/shallalist.tar.gz -C /var/lib/docker/volumes/dansguardian/_data/

ExecStartPre=-/usr/sbin/iptables -t nat -D PREROUTING 2

ExecStartPre=-/usr/bin/docker kill dansguardian
ExecStartPre=-/usr/bin/docker pull dry1d/dansguardian

ExecStartPre=-/usr/bin/docker rm -f dansguardian
ExecStart=/usr/bin/docker run -d --net=host -v logs:/var/log/ -v dansguardian:/etc/dansguardian -v clambase:/var/lib/clamav/ -v squidcache:/var/spool/squid3 --name dansguardian -t dry1d/dansguardian
TimeoutSec=300

ExecStartPost=/usr/sbin/iptables -t nat -A PREROUTING -i enp1s0 ! -d 192.168.0.0/16 -p tcp -m multiport --dport 80,8080 -j DNAT --to 192.168.0.1:8081

[X-Fleet]
MachineID="machine id"

  1. Скачивается shallalist.tar.gz
  2. распаковывается в /etc/dansguardian/BL
  3. Внутри контейнера перебираются все подкаталоги /etc/dansguardian/BL и добавляются строчки в файлах bannedsitelist и bannedurllist
  4. Затем стартует clamav-daemon, squid3, dansguardian по порядку
  5. Добавлен healthcheck
Docker Pull Command
Owner
dry1d