mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Dockernet Modifications
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
{%- set DNET = salt['pillar.get']('global:dockernet', '172.17.0.0') %}
|
||||||
firewall:
|
firewall:
|
||||||
hostgroups:
|
hostgroups:
|
||||||
anywhere:
|
anywhere:
|
||||||
@@ -9,7 +10,7 @@ firewall:
|
|||||||
ips:
|
ips:
|
||||||
delete:
|
delete:
|
||||||
insert:
|
insert:
|
||||||
- 172.17.0.0/24
|
- {{ DNET }}/24
|
||||||
localhost:
|
localhost:
|
||||||
ips:
|
ips:
|
||||||
delete:
|
delete:
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
{% set MAINIP = salt['pillar.get']('global:managerip') %}
|
{% set MAINIP = salt['pillar.get']('global:managerip') %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% set DNET = salt['pillar.get']('global:dockernet', '172.17.0.0') %}
|
||||||
|
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- mysql
|
- mysql
|
||||||
@@ -71,7 +73,7 @@ fleetdb:
|
|||||||
|
|
||||||
fleetdbuser:
|
fleetdbuser:
|
||||||
mysql_user.present:
|
mysql_user.present:
|
||||||
- host: 172.17.0.0/255.255.0.0
|
- host: {{ DNET }}/255.255.0.0
|
||||||
- password: {{ FLEETPASS }}
|
- password: {{ FLEETPASS }}
|
||||||
- connection_host: {{ MAINIP }}
|
- connection_host: {{ MAINIP }}
|
||||||
- connection_port: 3306
|
- connection_port: 3306
|
||||||
@@ -85,7 +87,7 @@ fleetdbpriv:
|
|||||||
- grant: all privileges
|
- grant: all privileges
|
||||||
- database: fleet.*
|
- database: fleet.*
|
||||||
- user: fleetdbuser
|
- user: fleetdbuser
|
||||||
- host: 172.17.0.0/255.255.0.0
|
- host: {{ DNET }}/255.255.0.0
|
||||||
- connection_host: {{ MAINIP }}
|
- connection_host: {{ MAINIP }}
|
||||||
- connection_port: 3306
|
- connection_port: 3306
|
||||||
- connection_user: root
|
- connection_user: root
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
{% set MAINIP = salt['grains.get']('ip_interfaces').get(salt['pillar.get']('sensor:mainint', salt['pillar.get']('manager:mainint', salt['pillar.get']('elasticsearch:mainint', salt['pillar.get']('host:mainint')))))[0] %}
|
{% set MAINIP = salt['grains.get']('ip_interfaces').get(salt['pillar.get']('sensor:mainint', salt['pillar.get']('manager:mainint', salt['pillar.get']('elasticsearch:mainint', salt['pillar.get']('host:mainint')))))[0] %}
|
||||||
{%- set MYSQLPASS = salt['pillar.get']('secrets:mysql', None) -%}
|
{%- set MYSQLPASS = salt['pillar.get']('secrets:mysql', None) -%}
|
||||||
{%- set PLAYBOOKPASS = salt['pillar.get']('secrets:playbook_db', None) -%}
|
{%- set PLAYBOOKPASS = salt['pillar.get']('secrets:playbook_db', None) -%}
|
||||||
|
{%- set DNET = salt['pillar.get']('global:dockernet', '172.17.0.0') %}
|
||||||
|
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- mysql
|
- mysql
|
||||||
@@ -19,7 +21,7 @@ create_playbookdbuser:
|
|||||||
- mysql.user_create:
|
- mysql.user_create:
|
||||||
- user: playbookdbuser
|
- user: playbookdbuser
|
||||||
- password: {{ PLAYBOOKPASS }}
|
- password: {{ PLAYBOOKPASS }}
|
||||||
- host: 172.17.0.0/255.255.0.0
|
- host: {{ DNET }}/255.255.255.0
|
||||||
- connection_host: {{ MAINIP }}
|
- connection_host: {{ MAINIP }}
|
||||||
- connection_port: 3306
|
- connection_port: 3306
|
||||||
- connection_user: root
|
- connection_user: root
|
||||||
@@ -28,7 +30,7 @@ create_playbookdbuser:
|
|||||||
query_playbookdbuser_grants:
|
query_playbookdbuser_grants:
|
||||||
mysql_query.run:
|
mysql_query.run:
|
||||||
- database: playbook
|
- database: playbook
|
||||||
- query: "GRANT ALL ON playbook.* TO 'playbookdbuser'@'172.17.0.0/255.255.0.0';"
|
- query: "GRANT ALL ON playbook.* TO 'playbookdbuser'@'{{ DNET }}/255.255.255.0';"
|
||||||
- connection_host: {{ MAINIP }}
|
- connection_host: {{ MAINIP }}
|
||||||
- connection_port: 3306
|
- connection_port: 3306
|
||||||
- connection_user: root
|
- connection_user: root
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
{%- import_json "soc/files/soc/hunt.queries.json" as hunt_queries %}
|
{%- import_json "soc/files/soc/hunt.queries.json" as hunt_queries %}
|
||||||
{%- import_json "soc/files/soc/hunt.actions.json" as hunt_actions %}
|
{%- import_json "soc/files/soc/hunt.actions.json" as hunt_actions %}
|
||||||
{%- import_json "soc/files/soc/hunt.eventfields.json" as hunt_eventfields %}
|
{%- import_json "soc/files/soc/hunt.eventfields.json" as hunt_eventfields %}
|
||||||
|
{%- set DNET = salt['pillar.get']('global:dockernet', '172.17.0.0') %}
|
||||||
|
|
||||||
{
|
{
|
||||||
"logFilename": "/opt/sensoroni/logs/sensoroni-server.log",
|
"logFilename": "/opt/sensoroni/logs/sensoroni-server.log",
|
||||||
"server": {
|
"server": {
|
||||||
@@ -49,7 +51,7 @@
|
|||||||
},
|
},
|
||||||
{% endif %}
|
{% endif %}
|
||||||
"statickeyauth": {
|
"statickeyauth": {
|
||||||
"anonymousCidr": "172.17.0.0/24",
|
"anonymousCidr": "{{ DNET }}/24",
|
||||||
"apiKey": "{{ SENSORONIKEY }}"
|
"apiKey": "{{ SENSORONIKEY }}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -462,11 +462,11 @@ whiptail_dockernet_check(){
|
|||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
whiptail --title "Security Onion Setup" --yesno \
|
whiptail --title "Security Onion Setup" --yesno \
|
||||||
"Do you want to change the IP range Docker uses? (Choose no if you don't know what this means)" 8 75
|
"Do you want to keep the default Docker IP range? (Choose yes if you don't know what this means)" 8 75
|
||||||
|
|
||||||
local exitstatus=$?
|
local exitstatus=$?
|
||||||
|
|
||||||
if [[ $exitstatus == 0 ]]; then
|
if [[ $exitstatus == 1 ]]; then
|
||||||
whiptail_dockernet_net
|
whiptail_dockernet_net
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -476,7 +476,7 @@ whiptail_dockernet_net() {
|
|||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
DOCKERNET=$(whiptail --title "Security Onion Setup" --inputbox \
|
DOCKERNET=$(whiptail --title "Security Onion Setup" --inputbox \
|
||||||
"\nEnter a network range for docker to use: \n \n(Default value is pre-populated)" 10 75 172.17.0.0/16 3>&1 1>&2 2>&3)
|
"\nEnter a /24 network range for docker to use: \n \n(Default value is pre-populated)" 10 75 172.17.0.0 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
local exitstatus=$?
|
local exitstatus=$?
|
||||||
whiptail_check_exitstatus $exitstatus
|
whiptail_check_exitstatus $exitstatus
|
||||||
|
|||||||
Reference in New Issue
Block a user