Hi there guys
I'm new to puppet I thinks it's a great tool and I'm trying to configure 
some task to perform automatically like users and some services which I had 
no
problems until now with iptables, this is what I'v got

server and client:
CentOS release 6.5 (Final)

On client:
puppet-2.7.25-2.el6.noarch

On server:
puppet-server-3.6.2-1.el6.noarch
puppet-3.6.2-1.el6.noarch

I'm following this:
https://forge.puppetlabs.com/puppetlabs/firewall

My config on server:
/etc/puppet/modules/my_fw/manifests
post.pp
pre.pp
class my_fw::post {
  firewall { '999 drop all':
    proto   => 'all',
    action  => 'drop',
    before  => undef,
  }
}

class my_fw::pre {
  Firewall {
    require => undef,
  }

  # Default firewall rules
  firewall { '000 accept all icmp':
    proto   => 'icmp',
    action  => 'accept',
  }->
  firewall { '001 accept all to lo interface':
    proto   => 'all',
    iniface => 'lo',
    action  => 'accept',
  }->
  firewall { '002 accept related established rules':
    proto   => 'all',
    ctstate => ['RELATED', 'ESTABLISHED'],
    action  => 'accept',
  }

  firewall { '100 allow http and https access':
    port   => [80, 443],
    proto  => tcp,
    action => accept,
  }

}

/etc/puppet/manifests
site.pp
# tell puppet on which client to run the class
node slnxserver {

include users

        #resources { "firewall":
        #purge => true
        #}

        Firewall {
                before  => Class['my_fw::post'],
                require => Class['my_fw::pre'],
        }

        class { ['my_fw::pre', 'my_fw::post']: }
        class { 'firewall': }
}

On the client I see the following:
tail -f /var/log/messages
Jul  1 16:01:09 slnxserver puppet-agent[16431]: Finished catalog run in 
0.35 seconds
Jul  1 16:02:41 slnxserver puppet-agent[16431]: Finished catalog run in 
0.33 seconds
Jul  1 16:04:13 slnxserver puppet-agent[16431]: Finished catalog run in 
0.30 seconds
Jul  1 16:05:45 slnxserver puppet-agent[16431]: Finished catalog run in 
0.28 seconds
Jul  1 16:07:17 slnxserver puppet-agent[16431]: Finished catalog run in 
0.29 seconds

No problems reported, but it seems the iptables rules are not applied, am I 
missing somthing else?

The 80:443 ports is not applied:

iptables -nL
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  

If I uncomment the resource statement above I get:
puppet-agent[16431]: Failed to apply catalog: Parameter name failed on 
Resources[firewall]: Could not find resource type 'firewall' at 
/etc/puppet/manifests/site.pp:8


Thanks for your time and support, any help appreciated.
Regards



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b5725b4e-d0cf-4a8a-b91b-dddaba98d9f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to