Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
a298341d
Commit
a298341d
authored
Jun 09, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
intrusion detection: or maybe this... #1233
parent
c9b7cdfe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
27 deletions
+8
-27
rc.conf.d
src/opnsense/service/templates/OPNsense/IDS/rc.conf.d
+3
-26
suricata.yaml
src/opnsense/service/templates/OPNsense/IDS/suricata.yaml
+5
-1
No files found.
src/opnsense/service/templates/OPNsense/IDS/rc.conf.d
View file @
a298341d
{
#
Macro
import
#
}
{%
from
'
OPNsense
/
Macros
/
interface
.
macro
'
import
physical_interface
%}
{%
if
helpers
.
exists
(
'
OPNsense
.
IDS
.
general
'
)
and
OPNsense
.
IDS
.
general
.
enabled
|
default
(
"0"
)
==
"1"
%}
{%
if
helpers
.
exists
(
'
OPNsense
.
IDS
.
general
'
)
and
OPNsense
.
IDS
.
general
.
enabled
|
default
(
"0"
)
==
"1"
%}
suricata_enable
=
"YES"
suricata_opnsense_bootup_run
=
"/usr/local/opnsense/scripts/suricata/setup.sh"
suricata_opnsense_bootup_run
=
"/usr/local/opnsense/scripts/suricata/setup.sh"
suricata_enable
=
"YES"
{%
if
OPNsense
.
IDS
.
general
.
ips
|
default
(
"0"
)
==
"1"
%}
{%
if
OPNsense
.
IDS
.
general
.
ips
|
default
(
"0"
)
==
"1"
%}
#
IPS
mode
,
switch
to
netmap
suricata_netmap
=
"YES"
suricata_netmap
=
YES
{%
else
%}
{%
else
%}
#
IDS
mode
,
pcap
live
mode
#
IDS
mode
,
pcap
live
mode
{%
set
addFlags
=[]
%}
suricata_flags
=
"-D --pcap"
{%
for
intfName
in
OPNsense
.
IDS
.
general
.
interfaces
.
split
(
','
)
%}
{%
if
loop
.
index
==
1
%}
{
#
enable
first
interface
#
}
suricata_interface
=
"{{ physical_interface(intfName) }}"
{%
else
%}
{
#
store
additional
interfaces
to
addFlags
#
}
{%
do
addFlags
.
append
(
physical_interface
(
intfName
))
%}
{%
endif
%}
{%
endfor
%}
{
#
append
additional
interfaces
#
}
suricata_flags
=
"-D --pcap {%
for intf in addFlags
%} -i {{ intf }} {% endfor
%} "
{%
endif
%}
{%
else
%}
{%
else
%}
suricata_enable
=
"NO"
suricata_enable
=
"NO"
{%
endif
%}
{%
endif
%}
src/opnsense/service/templates/OPNsense/IDS/suricata.yaml
View file @
a298341d
...
@@ -748,8 +748,12 @@ logging:
...
@@ -748,8 +748,12 @@ logging:
format
:
"
[%i]
<%d>
--
"
format
:
"
[%i]
<%d>
--
"
pcap
:
pcap
:
- interface
:
default
{
%
if helpers.exists('OPNsense.IDS.general.interfaces') %
}
{
%
for intfName in OPNsense.IDS.general.interfaces.split('
,
'
)
%}
-
interface:
{{physical_interface(intfName)}}
promisc:
{%
if
helpers.exists('
OPNsense.IDS.general.promisc') and OPNsense.IDS.general.promisc|default('0') == '1' %
}
yes
{
%
else %
}
no
{
%
endif %
}
# promiscuous mode
promisc:
{%
if
helpers.exists('
OPNsense.IDS.general.promisc') and OPNsense.IDS.general.promisc|default('0') == '1' %
}
yes
{
%
else %
}
no
{
%
endif %
}
# promiscuous mode
{
%
endfor %
}
{
%
endif %
}
pcap-file
:
pcap-file
:
# Possible values are:
# Possible values are:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment