jgs240
(Chris Ray)
May 20, 2020, 1:40pm
1
I see in the src that there is a mention of processing ERSPAN type II traffic:
/* Copyright (C) 2020 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
* Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
/**
* \ingroup decode
*
This file has been truncated. show original
I can’t find how to invoke this or implement it…does anyone know how to use this?
Edit: I think my question might be too vague (sorry!). Does anyone know how to get Suricata to process ERSPAN traffic?
jgs240
(Chris Ray)
May 20, 2020, 1:54pm
3
Yes that applies, that is what we are using to send traffic to Suricata (ERSPAN type II). I updated the OP with a clarified question. I am very familiar with ERSPAN/GRE tunneling, just can’t get Suricata to process it.
What version of Suricata are you using?
With 5.0.3 and later, ERSPAN Type II traffic is processed. The statistic decoder.erspan
reflects how many ERSPAN packets are seen.
ERSPAN Type I traffic must be configured with decoder.erspan.typeI.enabled
(default: off)
ERSPAN’s ethertype value is 0x88BE
. We use this to determine if it’s Type I or Type II:
GRE Header bits
Type I: 0|0|0|0|0|00000|000000000|00000
Type II: 0|0|0|1|0|00000|000000000|00000
jgs240
(Chris Ray)
May 20, 2020, 2:29pm
5
Thanks Jeff!
We are on 5.0.3.
I had to enable type I and this got the processing working! I don’t see decorder.erspan in stats.log though, is this located somewhere else?
It’s in stats.log
, e.g.,
$ grep decoder.erspan stats.log
decoder.erspan | Total | 84
$
its value must be > 0 to be included.
jgs240
(Chris Ray)
May 20, 2020, 2:41pm
7
That was it, thanks again! This solves many issues for me!