mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-28 11:18:51 +00:00
Merge pull request #818 from trixam/suricata-updatescript
Update update.sh
This commit is contained in:
commit
12c4308b89
2 changed files with 19 additions and 0 deletions
17
docker/suricata/dist/update.sh
vendored
17
docker/suricata/dist/update.sh
vendored
|
@ -40,3 +40,20 @@ if [ "$myCHECK" == "0" ];
|
||||||
else
|
else
|
||||||
echo "/etc/suricata/null.bpf"
|
echo "/etc/suricata/null.bpf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Download rules via URL
|
||||||
|
if [ "$FROMURL" != "" ] ; then
|
||||||
|
SAVEIFS=$IFS ; IFS='|'
|
||||||
|
for URL in $FROMURL; do
|
||||||
|
if [ $(curl -I --silent --output /dev/null --write-out "%{http_code}" "$URL") -eq 200 ] ; then
|
||||||
|
rm -rf /tmp/*
|
||||||
|
curl "$URL" -o /tmp/rules.tar.gz
|
||||||
|
tar -xvf /tmp/rules.tar.gz -C /tmp
|
||||||
|
suricata-update --local /tmp/rules --no-test
|
||||||
|
rm -rf /tmp/*
|
||||||
|
else
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS=$SAVEIFS
|
||||||
|
fi
|
||||||
|
|
|
@ -498,6 +498,8 @@ services:
|
||||||
environment:
|
environment:
|
||||||
# For ET Pro ruleset replace "OPEN" with your OINKCODE
|
# For ET Pro ruleset replace "OPEN" with your OINKCODE
|
||||||
- OINKCODE=OPEN
|
- OINKCODE=OPEN
|
||||||
|
# Loading externel Rules from URL
|
||||||
|
# - FROMURL="https://username:password@yoururl.com|https://username:password@otherurl.com"
|
||||||
network_mode: "host"
|
network_mode: "host"
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
|
|
Loading…
Reference in a new issue