mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-10-28 02:52:54 +00:00
Allow explicitly setting the tap interface
Adding ARG and ENV directives allows users to explicitly set the tap interface at build time with `--buildargs` or at run time with `--env`. This is useful for hosts with multiple network interfaces, or when the tap interface isn't the second interface listed by `/sbin/ip address`.
This commit is contained in:
parent
504e3f2734
commit
bdb57d0e12
1 changed files with 5 additions and 1 deletions
|
|
@ -1,5 +1,9 @@
|
|||
FROM alpine
|
||||
#
|
||||
# Set tap interface
|
||||
ARG TAP_IFACE
|
||||
ENV TAP_IFACE $TAP_IFACE
|
||||
#
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
#
|
||||
|
|
@ -127,4 +131,4 @@ RUN apk -U --no-cache add \
|
|||
#
|
||||
# Start suricata
|
||||
STOPSIGNAL SIGINT
|
||||
CMD SURICATA_CAPTURE_FILTER=$(update.sh $OINKCODE) && exec suricata -v -F $SURICATA_CAPTURE_FILTER -i $(/sbin/ip address | grep '^2: ' | awk '{ print $2 }' | tr -d [:punct:])
|
||||
CMD SURICATA_CAPTURE_FILTER=$(update.sh $OINKCODE) && exec suricata -v -F $SURICATA_CAPTURE_FILTER -i ${TAP_IFACE:-$(/sbin/ip address | grep '^2: ' | awk '{ print $2 }' | tr -d [:punct:])}
|
||||
|
|
|
|||
Loading…
Reference in a new issue