File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1
1
FROM node:lts-bullseye-slim
2
2
3
3
RUN apt update
4
- RUN apt install suricata git -y
4
+ RUN apt install suricata git iproute2 procps -y
5
5
6
6
WORKDIR /app
7
7
Original file line number Diff line number Diff line change @@ -7,12 +7,21 @@ echo "STARTING"
7
7
8
8
# INTERFACE=$(ip link | grep -w -P -o "eth.*(?=:)" | awk "NR==1{print $1}")
9
9
# TODO : grep this from interfaces. Ignore part after @
10
- INTERFACE=" eth0"
11
10
12
- sed -i " s/\$ {INTERFACE}/eth0/g" /etc/suricata/suricata.yaml
13
-
14
- echo " starting suricata"
15
- /usr/bin/suricata --pidfile /var/run/suricata.pid -c /etc/suricata/suricata.yaml -i $INTERFACE &
11
+ if [[ -z " $METLO_LISTEN_INTERFACE " ]]; then
12
+ echo " Metlo interface NOT PROVIDED"
13
+ echo " Defaulting to interface eth0"
14
+ sed -i " s/\$ {INTERFACE}/eth0/g" /etc/suricata/suricata.yaml
15
+ echo $INTERFACE
16
+ echo " starting suricata"
17
+ /usr/bin/suricata --pidfile /var/run/suricata.pid -c /etc/suricata/suricata.yaml -i eth0 &
18
+ else
19
+ echo " Metlo interface PROVIDED ${METLO_LISTEN_INTERFACE} "
20
+ sed -i " s/\$ {INTERFACE}/${INTERFACE} /g" /etc/suricata/suricata.yaml
21
+ echo $METLO_LISTEN_INTERFACE
22
+ echo " starting suricata"
23
+ /usr/bin/suricata --pidfile /var/run/suricata.pid -c /etc/suricata/suricata.yaml -i $METLO_LISTEN_INTERFACE &
24
+ fi
16
25
17
26
echo " starting metlo"
18
27
node /etc/metlo-ingestor/ingestors/suricata/dist/index.js -s /tmp/eve.sock -u $METLO_ADDR -k $METLO_KEY &
You can’t perform that action at this time.
0 commit comments