diff --git a/modules/utilities/unix/monitoring_ids/mirror_traffic_to_ids_iptables/manifests/install.pp b/modules/utilities/unix/monitoring_ids/mirror_traffic_to_ids_iptables/manifests/install.pp index b7ebd1a5f..d03145c2d 100644 --- a/modules/utilities/unix/monitoring_ids/mirror_traffic_to_ids_iptables/manifests/install.pp +++ b/modules/utilities/unix/monitoring_ids/mirror_traffic_to_ids_iptables/manifests/install.pp @@ -5,11 +5,21 @@ class mirror_traffic_to_ids_iptables::install { ensure_packages(['iptables-persistent']) # force it to not be enabled because the interface in the config may be wrong - exec { 'save iptables': + exec { 'save iptables prerouting': path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ], command => "iptables -t mangle -A PREROUTING -i `ls /sys/class/net | grep lo -v | head -n1` -j TEE --gateway $ids_IP_address ; iptables-save > /etc/iptables/rules.v4", provider => shell, }-> + exec { 'save iptables forward': + path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ], + command => "iptables -t mangle -A FORWARD -i `ls /sys/class/net | grep lo -v | head -n1` -j TEE --gateway $ids_IP_address ; iptables-save > /etc/iptables/rules.v4", + provider => shell, + }-> + exec { 'save iptables output': + path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ], + command => "iptables -t mangle -A OUTPUT -i `ls /sys/class/net | grep lo -v | head -n1` -j TEE --gateway $ids_IP_address ; iptables-save > /etc/iptables/rules.v4", + provider => shell, + }-> service { 'netfilter-persistent': enable => true, ensure => 'running',