first commit

This commit is contained in:
Mateusz Gruszczyński
2026-08-13 15:58:52 +02:00
commit adfdb0b86c
100 changed files with 6216 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# Creates an isolated /30 network for the IDS container.
# Defaults: RouterOS 172.31.255.1, container 172.31.255.2.
:if ([:len [/interface/bridge/find where name="br-ids"]] = 0) do={
/interface/bridge/add name=br-ids comment="Suricata IDS container bridge"
}
:if ([:len [/ip/address/find where interface="br-ids" and address="172.31.255.1/30"]] = 0) do={
/ip/address/add address=172.31.255.1/30 interface=br-ids comment="Suricata IDS gateway"
}
:if ([:len [/interface/veth/find where name="veth-ids"]] = 0) do={
/interface/veth/add name=veth-ids address=172.31.255.2/30 gateway=172.31.255.1 comment="Suricata IDS container"
}
:if ([:len [/interface/bridge/port/find where bridge="br-ids" and interface="veth-ids"]] = 0) do={
/interface/bridge/port/add bridge=br-ids interface=veth-ids
}
:if ([:len [/ip/firewall/nat/find where comment="Suricata IDS outbound NAT"]] = 0) do={
/ip/firewall/nat/add chain=srcnat src-address=172.31.255.0/30 action=masquerade comment="Suricata IDS outbound NAT"
}