host_firewall: optional nf_log_all_netns sysctl so the firewall logs of LXC guests reach the host kernel log
This commit is contained in:
@@ -27,6 +27,17 @@
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
# The kernel logs nft log statements of other network namespaces (LXC guests)
|
||||
# only with this sysctl; the lines land in the host kernel log.
|
||||
- name: Log the firewalls of container network namespaces
|
||||
ansible.posix.sysctl:
|
||||
name: net.netfilter.nf_log_all_netns
|
||||
value: "1"
|
||||
sysctl_file: /etc/sysctl.d/90-nf-log-all-netns.conf
|
||||
sysctl_set: true
|
||||
reload: false
|
||||
when: firewall.log.all_netns
|
||||
|
||||
- name: Install the systemd units
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item }}"
|
||||
|
||||
Reference in New Issue
Block a user