mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-06-14 14:18:40 +02:00
Pin NIC names by MAC via udev (run-once) from the common state
Add so-nic-pin, which writes by-MAC persistent-net udev rules pinning each physical NIC to its current name so a kernel upgrade can't renumber the interfaces Security Onion binds by name (host:mainint, sensor:mainint, bond0). Gated by the drop file /opt/so/state/nic_names_pinned: run-once on highstate, and an admin can pre-create the marker to opt out. Wired into common/init.sls as pin_nic_names, guarded by a matching unless.
This commit is contained in:
@@ -130,6 +130,17 @@ common_sbin:
|
||||
- so-pcap-import
|
||||
{% endif %}
|
||||
|
||||
# Pin physical NIC names by MAC (run-once) so a kernel upgrade can't renumber the
|
||||
# interfaces SO binds by name. The marker keeps it a one-time setup; an admin can
|
||||
# pre-create the marker to opt out.
|
||||
pin_nic_names:
|
||||
cmd.run:
|
||||
- name: /usr/sbin/so-nic-pin
|
||||
- unless: 'test -e /opt/so/state/nic_names_pinned'
|
||||
- require:
|
||||
- file: common_sbin
|
||||
- file: statedir
|
||||
|
||||
common_sbin_jinja:
|
||||
file.recurse:
|
||||
- name: /usr/sbin
|
||||
|
||||
Reference in New Issue
Block a user