From: Stephen Gran Date: Sat, 20 Feb 2010 21:21:55 +0000 (+0000) Subject: first stab at making the rules appear without doing anything X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=a048716e3b9d4dfb5a9dbdcecaea8a59df4a96e7;p=mirror%2Fdsa-puppet.git first stab at making the rules appear without doing anything Signed-off-by: Stephen Gran --- diff --git a/modules/debian-org/manifests/init.pp b/modules/debian-org/manifests/init.pp index bed7a84b7..9ff8c8542 100644 --- a/modules/debian-org/manifests/init.pp +++ b/modules/debian-org/manifests/init.pp @@ -17,6 +17,24 @@ define set_alternatives($linkto) { class debian-org { + ferm::rule { "dsa-ssh": + description => "Allow SSH from DSA", + rule => "proto tcp mod state state (NEW) dport (ssh) @subchain 'ssh' { saddr (\$SSH_SOURCES) ACCEPT; }" + } + ferm::rule { "dsa-ssh-v6": + description => "Allow SSH from DSA", + domain => "ip6", + rule => "proto tcp mod state state (NEW) dport (ssh) @subchain 'ssh' { saddr (\$SSH_V6_SOURCES) ACCEPT; }" + } + ferm::rule { "dsa-munin": + description => "Allow munin from munin master", + rule => "proto tcp mod state state (NEW) dport (munin) @subchain 'munin' { saddr (\$HOST_MUNIN) ACCEPT; }" + } + ferm::rule { "dsa-nagios": + description => "Allow nrpe from nagios master", + rule => "proto tcp mod state state (NEW) dport (5666) @subchain 'nagios' { saddr (\$HOST_NAGIOS) ACCEPT; }" + } + package { "userdir-ldap": ensure => installed; "zsh": ensure => installed; "cron": ensure => installed; diff --git a/modules/ferm/manifests/real.pp b/modules/ferm/manifests/real.pp index f891c9273..e3a1a0fa7 100644 --- a/modules/ferm/manifests/real.pp +++ b/modules/ferm/manifests/real.pp @@ -20,24 +20,6 @@ class ferm::real inherits ferm { notify => Exec["ferm restart"]; } - ferm::rule { "dsa-ssh": - description => "Allow SSH from DSA", - rule => "proto tcp mod state state (NEW) dport (ssh) @subchain 'ssh' { saddr (\$SSH_SOURCES) ACCEPT; }" - } - ferm::rule { "dsa-ssh-v6": - description => "Allow SSH from DSA", - domain => "ip6", - rule => "proto tcp mod state state (NEW) dport (ssh) @subchain 'ssh' { saddr (\$SSH_V6_SOURCES) ACCEPT; }" - } - ferm::rule { "dsa-munin": - description => "Allow munin from munin master", - rule => "proto tcp mod state state (NEW) dport (munin) @subchain 'munin' { saddr (\$HOST_MUNIN) ACCEPT; }" - } - ferm::rule { "dsa-nagios": - description => "Allow nrpe from nagios master", - rule => "proto tcp mod state state (NEW) dport (5666) @subchain 'nagios' { saddr (\$HOST_NAGIOS) ACCEPT; }" - } - Exec["ferm restart"] { path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin", refreshonly => true,