Project

General

Profile

Actions

Feature #1251

closed

Using more then one include file within one config part

Added by Andreas Herz over 9 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Effort:
Difficulty:
Label:

Description

I want to achieve the following setup:

vars.yaml (inluded by suricata.yaml via "include: vars.yaml")

%YAML 1.1
---

vars:

  address-groups:

    HOME_NET: "[192.168.0.0/16,10.0.50.0/24,172.16.0.0/12,$FOOBAR,$FOOBAR2]" 

    EXTERNAL_NET: "!$HOME_NET" 

    HTTP_SERVERS: "$HOME_NET" 

    # and so on...

  port-groups:

    HTTP_PORTS: "80,3128,8000,8080" 
    # and so on...

This file should include other .yaml files:

foobar.yaml

%YAML 1.1
---
FOOBAR: "1.2.3.4/24" 

foobar2.yaml

%YAML 1.1
---
FOOBAR2: "5.6.7.8/24" 

I played around with adding vars: address-groups: into the foobar.yaml, tried "!include" and "include:" but i never got the result i wanted.

The reason behind this is, that i want to fill the foobar(2).yaml with the current valid dynamic IPs (via network scripts) and then trigger a rule reload in suricata so the HOME_NET gets updated.

So is there a way to include several yaml files that add values within this hierarchy?

Actions

Also available in: Atom PDF