]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/log
puppet-modules/puppetlabs-firewall.git
12 years agoUpdate to also be for destination
Tomas Doran [Thu, 11 Apr 2013 22:19:42 +0000 (23:19 +0100)]
Update to also be for destination

12 years agoFix error reporting for insane hostnames.
Tomas Doran [Tue, 4 Sep 2012 16:04:35 +0000 (17:04 +0100)]
Fix error reporting for insane hostnames.

If you put some really silly values in (e.g. /) into hostnames then
the error message s super super cryptic.

This patch fixes that, so it's at least obvious what / where / why it's
failing if you use --trace --debug

12 years agoMerge branch 'maint/master/add_puppet_31_to_travis'
Ken Barber [Sat, 23 Feb 2013 15:24:27 +0000 (15:24 +0000)]
Merge branch 'maint/master/add_puppet_31_to_travis'

* maint/master/add_puppet_31_to_travis:
  Add Puppet 3.1 to travis-ci test matrix

12 years agoAdd Puppet 3.1 to travis-ci test matrix
Ken Barber [Sat, 23 Feb 2013 15:20:29 +0000 (15:20 +0000)]
Add Puppet 3.1 to travis-ci test matrix

Signed-off-by: Ken Barber <ken@bob.sh>
12 years agoMerge pull request #96 from sfozz/documentation-fixes
Ken Barber [Sat, 23 Feb 2013 15:16:03 +0000 (07:16 -0800)]
Merge pull request #96 from sfozz/documentation-fixes

Add missing class declaration

12 years agoMerge pull request #109 from dcarley/fix_tests_ruby_193
Ken Barber [Sat, 23 Feb 2013 15:00:44 +0000 (07:00 -0800)]
Merge pull request #109 from dcarley/fix_tests_ruby_193

Fix tests for Ruby 1.9.3 from 3e13bf3

12 years agoFix tests for Ruby 1.9.3 from 3e13bf3
Dan Carley [Sat, 23 Feb 2013 14:10:39 +0000 (14:10 +0000)]
Fix tests for Ruby 1.9.3 from 3e13bf3

Changes in 3e13bf3 broke tests for Ruby 1.9.3 which doesn't support
Enumerable on Strings. Workaround this by casting everything as an array and
flattening to prevent existing arrays from being encapsulated.

12 years agoMerge branch 'ticket/master/single_sport_dport_support_for_parsing'
Ken Barber [Fri, 22 Feb 2013 17:00:20 +0000 (17:00 +0000)]
Merge branch 'ticket/master/single_sport_dport_support_for_parsing'

* ticket/master/single_sport_dport_support_for_parsing:
  Add support for single --sport and --dport parsing

12 years agoAdd support for single --sport and --dport parsing
Ken Barber [Fri, 22 Feb 2013 16:55:37 +0000 (16:55 +0000)]
Add support for single --sport and --dport parsing

Previously if someone already had a rule with a single --sport or --dport we
would fail the parse. This now accepts parsing in the single variant, while
still supporting the multiport variant.

Signed-off-by: Ken Barber <ken@bob.sh>
12 years agoMerge branch 'ticket/master/socket'
Ken Barber [Fri, 22 Feb 2013 16:06:22 +0000 (16:06 +0000)]
Merge branch 'ticket/master/socket'

* ticket/master/socket:
  Add support for -m socket option
  Added type for socket
  Add tests for socket option

12 years agoAdd support for -m socket option
Ken Barber [Fri, 22 Feb 2013 15:50:41 +0000 (15:50 +0000)]
Add support for -m socket option

This adds support to boolean-style flags like '-m socket' as well.

Signed-off-by: Ken Barber <ken@bob.sh>
12 years agoAdded type for socket
Ken Barber [Fri, 22 Feb 2013 15:08:19 +0000 (15:08 +0000)]
Added type for socket

Signed-off-by: Ken Barber <ken@bob.sh>
12 years agoAdd tests for socket option
Ken Barber [Fri, 22 Feb 2013 15:03:10 +0000 (15:03 +0000)]
Add tests for socket option

Signed-off-by: Ken Barber <ken@bob.sh>
12 years agoMerge branch 'standardize_travis'
Ken Barber [Sun, 3 Feb 2013 02:10:35 +0000 (03:10 +0100)]
Merge branch 'standardize_travis'

* standardize_travis:
  Fix require of precise puppet library
  Update travis and gemfile to be like stdlib travis files
  Remove gemfile.lock and add to gitignore

12 years agoFix require of precise puppet library
Ken Barber [Sun, 3 Feb 2013 02:03:55 +0000 (03:03 +0100)]
Fix require of precise puppet library

rspec tests fail unless we added require 'puppet'.

Signed-off-by: Ken Barber <ken@bob.sh>
12 years agoUpdate travis and gemfile to be like stdlib travis files
William Van Hevelingen [Sun, 3 Feb 2013 01:38:46 +0000 (17:38 -0800)]
Update travis and gemfile to be like stdlib travis files

12 years agoRemove gemfile.lock and add to gitignore
William Van Hevelingen [Sun, 3 Feb 2013 01:37:23 +0000 (17:37 -0800)]
Remove gemfile.lock and add to gitignore

12 years agoMerge pull request #102 from kbarber/test_updates
Ken Barber [Tue, 15 Jan 2013 06:09:05 +0000 (22:09 -0800)]
Merge pull request #102 from kbarber/test_updates

Update test framework to the modern age

12 years agoUpdate test framework to the modern age
Ken Barber [Mon, 14 Jan 2013 03:22:29 +0000 (03:22 +0000)]
Update test framework to the modern age

* Install puppetalbs_spec_helper and removed the stuff we were using previously
* Get tests running on 3.0.x
* Update gemspecs to more recent revisions of test tooling

Signed-off-by: Ken Barber <ken@bob.sh>
12 years agoMerge branch '14463-port_fixnums_to_strings'
Dan Carley [Thu, 29 Nov 2012 17:25:51 +0000 (17:25 +0000)]
Merge branch '14463-port_fixnums_to_strings'

Fixes #101 pull request.

12 years ago(#14463) Fix to pass unit tests
Sharif Nassar [Tue, 27 Nov 2012 22:32:46 +0000 (14:32 -0800)]
(#14463) Fix to pass unit tests

* Add default protocol to fix the test for converting a string 'ssh' to a port
number was failing like so:
  1) Puppet::Type::Firewall dport should convert a port name for dport to its number
     Failure/Error: @resource[port] = 'ssh'
     Puppet::Error:
       Parameter dport failed: Munging failed for value "ssh" in class dport: no such service ssh/proto
     # ./lib/puppet/type/../../puppet/util/firewall.rb:84:in `getservbyname'
     # ./lib/puppet/type/../../puppet/util/firewall.rb:84:in `string_to_port'
     # ./lib/puppet/type/firewall.rb:164:in `unsafe_munge'
     # ./spec/unit/puppet/type/firewall_spec.rb:161

* Always convert the response .to_s

12 years ago(#14463) Convert port Fixnum into strings
Sharif Nassar [Tue, 27 Nov 2012 19:39:59 +0000 (11:39 -0800)]
(#14463) Convert port Fixnum into strings

Avert errors like this:
Parameter dport failed: Munging failed for value 1194 in class dport: can’t convert Fixnum into String

Also, pass along the protocol so Socket can make well informed decisions.

12 years agoMerge pull request #100 from mediatemple/16004-fix_uidgid
Dan Carley [Mon, 19 Nov 2012 11:59:48 +0000 (03:59 -0800)]
Merge pull request #100 from mediatemple/16004-fix_uidgid

(#16004) uid/gid array_matching is contraindicated.

12 years ago(#16004) array_matching is contraindicated.
Sharif Nassar [Fri, 16 Nov 2012 20:49:18 +0000 (12:49 -0800)]
(#16004) array_matching is contraindicated.

With ":array_matching =>:all", uid/gid rules are reloaded with every
Puppet run.  This is ugly and annoying, and arguably wrong.

12 years agoAdd missing class declaration
sfozz [Fri, 24 Aug 2012 11:30:39 +0000 (12:30 +0100)]
Add missing class declaration

README.markdown was missing details about declaring 'my_fw::pre'
and 'my_fw::post' which caused folks following the example to see
the following error:

Could not find dependency Class[My_w::Pre] for Firewall[BLAH]

12 years agoMerge pull request #91 from saysjonathan/rspec_new_api
Ken Barber [Fri, 27 Jul 2012 19:59:44 +0000 (12:59 -0700)]
Merge pull request #91 from saysjonathan/rspec_new_api

rspec 2.11 compatibility

12 years agorspec 2.11 compatibility
Jonathan Boyett [Fri, 27 Jul 2012 17:54:02 +0000 (10:54 -0700)]
rspec 2.11 compatibility

12 years agoMerge pull request #89 from kbarber/ticket/master/10322-error_with_same_chain_diff_table
Dan Carley [Wed, 25 Jul 2012 08:56:28 +0000 (01:56 -0700)]
Merge pull request #89 from kbarber/ticket/master/10322-error_with_same_chain_diff_table

(#10322) Insert order hash included chains from different tables

12 years ago(#10322) Insert order hash included chains from different tables
Ken Barber [Tue, 24 Jul 2012 19:29:54 +0000 (20:29 +0100)]
(#10322) Insert order hash included chains from different tables

This fix corrects the insert_order handling to make sure that not only are
rules from the same chain evaulated, but we also check that the table
matches as well.

12 years agoMerge pull request #87 from dcarley/15556-icmp6_codes
Ken Barber [Tue, 17 Jul 2012 12:23:39 +0000 (05:23 -0700)]
Merge pull request #87 from dcarley/15556-icmp6_codes

(#15556) Support for ICMP6 type code resolutions

12 years ago(#15556) Support for ICMP6 type code resolutions
Dan Carley [Fri, 6 Jul 2012 07:22:32 +0000 (08:22 +0100)]
(#15556) Support for ICMP6 type code resolutions

Add support for IPv6 ICMP code types as strings, which differ in mapping
from IPv4. A subset of the currently supported strings for IPv4 are
supported where applicable to the IPv6 specification.

Currently the only way of determining the protocol family is by whether the
provider is :iptables or :ip6tables. This can be changed within the type in
the future.

12 years agoMerge pull request #86 from Whopper92/readme_best_practices
Ken Barber [Thu, 28 Jun 2012 22:32:55 +0000 (15:32 -0700)]
Merge pull request #86 from Whopper92/readme_best_practices

Update formatting of README to meet Puppet Labs best practices

12 years agoUpdate formatting of README to meet Puppet Labs best practices
Will Hopper [Thu, 28 Jun 2012 22:08:12 +0000 (15:08 -0700)]
Update formatting of README to meet Puppet Labs best practices

12 years agoMerge branch 'ticket/master/14755-stub_iptables_facts_for_set_mark_tests'
Ken Barber [Thu, 21 Jun 2012 10:22:35 +0000 (11:22 +0100)]
Merge branch 'ticket/master/14755-stub_iptables_facts_for_set_mark_tests'

* ticket/master/14755-stub_iptables_facts_for_set_mark_tests:
  (#14755) Stub iptables facts for set_mark tests

12 years ago(#14755) Stub iptables facts for set_mark tests
Dan Carley [Tue, 12 Jun 2012 07:17:11 +0000 (08:17 +0100)]
(#14755) Stub iptables facts for set_mark tests

Tests both paths of new set_mark code for IPtables 1.3.2 and 1.4.2

Also allows these tests to run independently of the version of IPtables on
the host machine, if any at all.

12 years agoMerge branch 'fix_mark'
Ken Barber [Wed, 20 Jun 2012 17:37:34 +0000 (18:37 +0100)]
Merge branch 'fix_mark'

* fix_mark:
  (#14755) Stub iptables_version for now so tests run on non-Linux hosts
  (#14755) Fix mark to not repeat rules with iptables 1.4.1+.

12 years ago(#14755) Stub iptables_version for now so tests run on non-Linux hosts
Ken Barber [Wed, 20 Jun 2012 17:26:05 +0000 (18:26 +0100)]
(#14755) Stub iptables_version for now so tests run on non-Linux hosts

Without a stub some tests fail on non-Linux hosts. This is because they are
expecting a particular version of iptables to exist which isn't always true.

The right answer for the provider is to actually allow the fact to be set
per test, but for now we are doing a global override just to make tests pass.

12 years ago(#14755) Fix mark to not repeat rules with iptables 1.4.1+.
Sharif Nassar [Wed, 30 May 2012 23:12:21 +0000 (16:12 -0700)]
(#14755) Fix mark to not repeat rules with iptables 1.4.1+.

12 years agoMerge branch 'ticket/master/14949'
Ken Barber [Wed, 20 Jun 2012 17:09:31 +0000 (18:09 +0100)]
Merge branch 'ticket/master/14949'

* ticket/master/14949:
  (#14949) Added pkttype property

12 years ago(#14949) Added pkttype property
Ashley Penney [Mon, 21 May 2012 18:28:16 +0000 (14:28 -0400)]
(#14949) Added pkttype property

This adds the pkttype property so we can match multicast and broadcast packets.

12 years agoMerge pull request #85 from jasonhancock/ticket/15038-add_gre_protocol
Ken Barber [Thu, 14 Jun 2012 16:08:45 +0000 (09:08 -0700)]
Merge pull request #85 from jasonhancock/ticket/15038-add_gre_protocol

(#15038) add gre protocol to list of acceptable protocols

12 years ago(#15038) add gre protocol to list of acceptable protocols
Jason Hancock [Thu, 14 Jun 2012 15:21:09 +0000 (08:21 -0700)]
(#15038) add gre protocol to list of acceptable protocols

12 years agoMerge branch 'ticket/master/supported_versions'
Ken Barber [Sun, 10 Jun 2012 21:31:33 +0000 (22:31 +0100)]
Merge branch 'ticket/master/supported_versions'

* ticket/master/supported_versions:
  (maint) be clearer about what distributions we support

12 years ago(maint) be clearer about what distributions we support
Ken Barber [Sun, 10 Jun 2012 21:30:53 +0000 (22:30 +0100)]
(maint) be clearer about what distributions we support

12 years agoMerge branch '9364-normalise_addresses_to_cidr'
Ken Barber [Sun, 10 Jun 2012 21:17:24 +0000 (22:17 +0100)]
Merge branch '9364-normalise_addresses_to_cidr'

* 9364-normalise_addresses_to_cidr:
  (#9364 #10085) Normalise iptables-save to CIDR
  (#9364 #10085) Convert an existing test to CIDR

12 years ago(#9364 #10085) Normalise iptables-save to CIDR
Dan Carley [Thu, 24 May 2012 18:02:06 +0000 (19:02 +0100)]
(#9364 #10085) Normalise iptables-save to CIDR

Normalise all source and destination addresses to CIDR notation as they are
reverse-parsed from iptables-save. This ensures that they match how
addresses are forward-parsed by the type with Util::Firewall.host_to_ip.

Fixes two issues which both principally affect EL5 and may affect other
providers in the future.

Issue #9364:
    Single IP addresses not representing a range should be qualified in CIDR
    notation with /32 for IPv4 and /128 for IPv6.

Issue #10085:
    Addresses with a dotted quad netmask representing a range should be
    qualifed with in CIDR notation instead.

12 years ago(#9364 #10085) Convert an existing test to CIDR
Dan Carley [Thu, 24 May 2012 17:57:46 +0000 (18:57 +0100)]
(#9364 #10085) Convert an existing test to CIDR

Modify an existing test which has a source IP address without CIDR notation.
This will break after normalisation because [:params][:source] is expected
to be CIDR. Updating -s within [:line] too, since we aren't explcitly testing
that behaviour with this fixture.

12 years agoMerge branch 'ticket/master/14938-travis_matrices'
Ken Barber [Sun, 10 Jun 2012 17:23:01 +0000 (18:23 +0100)]
Merge branch 'ticket/master/14938-travis_matrices'

* ticket/master/14938-travis_matrices:
  (#14938) Add more test variations for travis testing

12 years ago(#14938) Add more test variations for travis testing
Ken Barber [Sun, 10 Jun 2012 14:56:17 +0000 (15:56 +0100)]
(#14938) Add more test variations for travis testing

Include different variations of Puppet to be tested, and fix any pending issues
so all tests pass.

12 years agoMerge branch 'travis_ci'
Ken Barber [Sat, 9 Jun 2012 23:41:18 +0000 (00:41 +0100)]
Merge branch 'travis_ci'

* travis_ci:
  (maint) Enable travis-ci support.

12 years ago(maint) Enable travis-ci support.
Ken Barber [Mon, 28 May 2012 11:41:36 +0000 (12:41 +0100)]
(maint) Enable travis-ci support.

12 years agoMerge branch '13560'
Ken Barber [Sat, 9 Jun 2012 23:29:47 +0000 (00:29 +0100)]
Merge branch '13560'

* 13560:
  (#13560) OUTPUT is a valid chain for the mangle table

12 years ago(#13560) OUTPUT is a valid chain for the mangle table
Adam Gibbins [Thu, 29 Mar 2012 15:47:09 +0000 (16:47 +0100)]
(#13560) OUTPUT is a valid chain for the mangle table

12 years agoMerge branch 'ticket/10025-TCP-flags-matching-support'
Ken Barber [Sat, 9 Jun 2012 23:20:03 +0000 (00:20 +0100)]
Merge branch 'ticket/10025-TCP-flags-matching-support'

* ticket/10025-TCP-flags-matching-support:
  (#10025) Make tcp_flags support a feature.
  (#10025) Add support for --tcp-flags

12 years ago(#10025) Make tcp_flags support a feature.
Ken Barber [Sat, 9 Jun 2012 23:18:04 +0000 (00:18 +0100)]
(#10025) Make tcp_flags support a feature.

12 years ago(#10025) Add support for --tcp-flags
Thomas Vander Stichele [Sun, 4 Mar 2012 17:16:20 +0000 (18:16 +0100)]
(#10025) Add support for --tcp-flags

12 years agoMerge pull request #60 from dcarley/10164-icmp_any
Ken Barber [Sat, 9 Jun 2012 23:01:21 +0000 (16:01 -0700)]
Merge pull request #60 from dcarley/10164-icmp_any

(#10164) Reject and document icmp => "any"

12 years agoMerge pull request #79 from mediatemple/limitfix
Ken Barber [Wed, 6 Jun 2012 14:55:28 +0000 (07:55 -0700)]
Merge pull request #79 from mediatemple/limitfix

(#14641) Fix for incorrect limit command arguments for ip6tables provider

12 years agoMerge pull request #80 from dcarley/10274-zero_prefixlen_addresses
Ken Barber [Mon, 28 May 2012 11:32:39 +0000 (04:32 -0700)]
Merge pull request #80 from dcarley/10274-zero_prefixlen_addresses

(#10274) Nullify addresses with zero prefixlen

12 years ago(#10274) Nullify addresses with zero prefixlen
Dan Carley [Fri, 25 May 2012 06:41:36 +0000 (07:41 +0100)]
(#10274) Nullify addresses with zero prefixlen

Modify the behaviour of Util::Firewall.host_to_ip, as used by the type to
parse source and destination addresses, to return nil if the resulting CIDR
represented address has a prefix length of zero. Includes type and provider
tests for IPv4 and IPv6.

IPtables silently omits rules with source and destination addresses that
have a prefix length of zero (eg. 0.0.0.0/0) because they are functionally
equivialent to not specifying any address. This was causing rules to be
unecessarily reloaded.

The behaviour of Util::IPcidr remains the same. Now includes some additional
tests for it's identification of zero prefixlen IPv4 and IPv6 addresses.

12 years ago(#10274) Document Util::Firewall.host_to_ip
Dan Carley [Fri, 25 May 2012 09:24:39 +0000 (10:24 +0100)]
(#10274) Document Util::Firewall.host_to_ip

Document the current behaviour of Util::Firewall.host_to_ip before it is
modified to handle addresses with zero prefix lengths.

12 years ago(#14641) Fix for incorrect limit command arguments for ip6tables provider
Michael Hsu [Tue, 22 May 2012 15:02:27 +0000 (08:02 -0700)]
(#14641) Fix for incorrect limit command arguments for ip6tables provider

13 years agoMerge branch 'ignore_errors'
Ken Barber [Sun, 20 May 2012 17:20:39 +0000 (18:20 +0100)]
Merge branch 'ignore_errors'

* ignore_errors:
  (#14590) Fix for when iptables-save spews out "FATAL" errors.

13 years ago(#14590) Fix for when iptables-save spews out "FATAL" errors.
Sharif Nassar [Sat, 21 Jan 2012 01:22:16 +0000 (17:22 -0800)]
(#14590) Fix for when iptables-save spews out "FATAL" errors.

On some broken Virtuozzo containers, /lib/modules/$(uname -r)/modules.dep is
absent. This causes iptables-save to give some "FATAL" errors.  This patch
fixes the parser to ignore them instead of generating garbage rules that make
for errors in the puppet agent run.

13 years agoMerge branch 'ticket/master/14455'
Ken Barber [Sun, 13 May 2012 21:52:58 +0000 (22:52 +0100)]
Merge branch 'ticket/master/14455'

* ticket/master/14455:
  (#14455) Add tests for interface names containing a "+". Add a few missing tests for VLAN support.
  (#14455) Support interface names containing "+"

13 years ago(#14455) Add tests for interface names containing a "+". Add a few missing tests...
Simon Deziel [Sat, 12 May 2012 15:24:59 +0000 (11:24 -0400)]
(#14455) Add tests for interface names containing a "+". Add a few missing tests for VLAN support.

13 years ago(#14455) Support interface names containing "+"
Simon Deziel [Sat, 12 May 2012 15:23:45 +0000 (11:23 -0400)]
(#14455) Support interface names containing "+"

Previously iniface and outiface wouldn't allow + in the interface names. This
patch fixes that.

13 years agoMerge pull request #72 from jashort/ticket/13896-fix_example
Ken Barber [Thu, 12 Apr 2012 09:03:40 +0000 (02:03 -0700)]
Merge pull request #72 from jashort/ticket/13896-fix_example

(#13896) Fix Firewall Example

13 years ago* (#13896) Changed 'jump' to 'action', commands to lower case
Jason Short [Wed, 11 Apr 2012 23:49:50 +0000 (16:49 -0700)]
* (#13896) Changed 'jump' to 'action', commands to lower case

13 years agoMerge pull request #69 from kbarber/ticket/10619-Unable_to_purge_rules
Dan Carley [Mon, 26 Mar 2012 08:44:38 +0000 (01:44 -0700)]
Merge pull request #69 from kbarber/ticket/10619-Unable_to_purge_rules

* (#10619) Add the table when deleting rules
* (#10619) Fix tests since we are now prefixing -t <table> during delete
* Fix extraneous trailing whitespace

13 years agoMerge pull request #70 from kbarber/ticket/11305-support_vlan_interface
Dan Carley [Mon, 26 Mar 2012 08:37:15 +0000 (01:37 -0700)]
Merge pull request #70 from kbarber/ticket/11305-support_vlan_interface

* (#11305) Support vlan interfaces
* (#11305) Add tests for VLAN support for iniface/outiface

13 years agoMerge pull request #61 from adamgibbins/master
Ken Barber [Mon, 26 Mar 2012 08:19:10 +0000 (01:19 -0700)]
Merge pull request #61 from adamgibbins/master

Improved Puppet DSL style as per the guidelines.

13 years agoFix extraneous trailing whitespace
Ken Barber [Sat, 24 Mar 2012 22:38:21 +0000 (22:38 +0000)]
Fix extraneous trailing whitespace

13 years ago(#10619) Fix tests since we are now prefixing -t <table> during delete
Ken Barber [Sat, 24 Mar 2012 22:35:07 +0000 (22:35 +0000)]
(#10619) Fix tests since we are now prefixing -t <table> during delete

13 years ago(#10619) Add the table when deleting rules
Johan Huysmans [Fri, 9 Dec 2011 11:47:54 +0000 (12:47 +0100)]
(#10619) Add the table when deleting rules

This fixes purging from tables other then 'filter'.

13 years ago(#11305) Add tests for VLAN support for iniface/outiface
Ken Barber [Sun, 25 Mar 2012 02:07:36 +0000 (03:07 +0100)]
(#11305) Add tests for VLAN support for iniface/outiface

This adds tests generally for iniface and outiface, and includes examples
of interfaces with VLAN's to support that change.

13 years ago(#11305) Support vlan interfaces (interface containing ".")
Johan Huysmans [Fri, 9 Dec 2011 09:05:28 +0000 (10:05 +0100)]
(#11305) Support vlan interfaces (interface containing ".")

13 years agoMerge pull request #68 from kbarber/ticket/master/13216-fixed_setup_instructions_in_r...
Dan Carley [Tue, 20 Mar 2012 08:01:52 +0000 (01:01 -0700)]
Merge pull request #68 from kbarber/ticket/master/13216-fixed_setup_instructions_in_readme

(#13216) Fix README so setup instructions actually work

13 years ago(#13216) Fix README so setup instructions actually work
Ken Barber [Mon, 19 Mar 2012 17:44:48 +0000 (17:44 +0000)]
(#13216) Fix README so setup instructions actually work

The old setup instructions were vague, and incorrect. This fixes those
instructions so they actually work, and breaks them out into their own
section.(#13216) Fix README so setup instructions actually work

13 years agoMerge pull request #67 from dcarley/13201-autoreq_chain
Ken Barber [Mon, 19 Mar 2012 16:36:09 +0000 (09:36 -0700)]
Merge pull request #67 from dcarley/13201-autoreq_chain

(#13201) Firewall autorequire Firewallchains

13 years ago(#13201) Tests and docstring for chain autorequire
Dan Carley [Sun, 18 Mar 2012 13:16:38 +0000 (13:16 +0000)]
(#13201) Tests and docstring for chain autorequire

Test for autorequire behaviour on :chain, :jump, and :chain + :jump params.
With both specified and default/undef :table and :provider params.

Document autorequire behaviour in docstring.

13 years ago(#13201) Firewall autorequire Firewallchains
Dan Carley [Sat, 17 Mar 2012 11:00:56 +0000 (11:00 +0000)]
(#13201) Firewall autorequire Firewallchains

Autorequire Firewallchain resources for Firewall resources that have jump or
chain parameters. Remove require params from README examples now that
they're not essential.

Only deals with iptables and ip6tables providers, which have support for
chains. Doesn't attempt to weed out chains that might be builtin. Just let
Puppet determine which of the resources are really managed.

13 years agoMerge pull request #63 from kbarber/ticket/master/13192_allvalidchains_order
Dan Carley [Sat, 17 Mar 2012 10:01:15 +0000 (03:01 -0700)]
Merge pull request #63 from kbarber/ticket/master/13192_allvalidchains_order

(#13192) Fix allvalidchain iteration

13 years ago(#13192) Fix allvalidchain iteration
Ken Barber [Fri, 16 Mar 2012 22:16:23 +0000 (15:16 -0700)]
(#13192) Fix allvalidchain iteration

Before this patch, we were getting errors because chain & table were swapped
during creation.

13 years agoMerge pull request #62 from kbarber/ticket/10162-firewallchain_support_for_merge
Jonathan Boyett [Fri, 16 Mar 2012 18:43:04 +0000 (11:43 -0700)]
Merge pull request #62 from kbarber/ticket/10162-firewallchain_support_for_merge

Ticket/10162 firewallchain support for merge

13 years ago(#10162) Fix examples for firewallchain in README
Ken Barber [Fri, 16 Mar 2012 17:11:03 +0000 (10:11 -0700)]
(#10162) Fix examples for firewallchain in README

13 years ago(#10162) Modify firewallchain name to be chain:table:protocol
Ken Barber [Mon, 12 Mar 2012 18:40:45 +0000 (11:40 -0700)]
(#10162) Modify firewallchain name to be chain:table:protocol

We've decided to change the ordering of the namevar so that it is now:

    chain:table:protocol

So its closer to a linear hierachy ie. chain in table in protocol.

Previously this was table:chain:protocol which made less sense.

13 years ago(#10162) Various fixes for firewallchain resource
Ken Barber [Mon, 12 Mar 2012 04:16:33 +0000 (21:16 -0700)]
(#10162) Various fixes for firewallchain resource

* Convert commands to optional_commands to avoid iptables installation chicken
  & egg scenarios.
* Downcase tables to match the table names in xtables
* Force fully qualifying the name as <table>:<chain>:<protocol>, we can add
  meaningful defaults later.
* puppet resource <name> command wasn't working as expected, but stripping out
  some of the meaningful defaults I was able to get this to work.
* Reformat some of the code to avoid overrunning 80 chars where possible
* Remove trailing whitespace
* Add flush to provider so that resource modifications immediately update the
  resource in reports and when using puppet resource.
* Removed any commented out code
* Improved documentation
* Change policy so its undefined when not set, instead of being :empty
* Fix test mocking so they will run on a Mac

13 years ago(#10162) add firewallchain type and iptables_chain provider
Daniel Black [Thu, 1 Mar 2012 01:46:02 +0000 (12:46 +1100)]
(#10162) add firewallchain type and iptables_chain provider

Add firewallchain type and iptables_chain provider. This is required
to support the firewall class and it is envisaged that an autorequire
will be used to automatically require the user chain. This type can also set
policies on inbuilt chains.

Provider covers ebtables (optional), iptables, ip6tables.

13 years agoMake Puppet DSL compliant with the style guides and puppet lint.
Adam Gibbins [Sun, 11 Mar 2012 21:16:40 +0000 (21:16 +0000)]
Make Puppet DSL compliant with the style guides and puppet lint.

13 years ago(#10164) Reject and document icmp => "any"
Dan Carley [Fri, 9 Mar 2012 09:13:33 +0000 (09:13 +0000)]
(#10164) Reject and document icmp => "any"

iptables accepts the string "any" as an ICMP type and stores it behind the
scenes as the fake (IANA reserved) numeric 255. This is functionally
equivalent to not specifying an `--icmp-type` argument.

ip6tables didn't carry this "feature" over. Like many other providers, the
matching of any ICMP packet type is only achieved by omitting the
`--icmpv6-type` arugment.

For the purpose of simpler logic and future provider compatibility we
prevent people from using the value "any" and advise them to omit/undefine
the param instead.

Include a test that somewhat duplicates the prevention of invalid strings
but would preserve this behaviour should icmp_name_to_number() ever change.

13 years agoMerge branch '12897-validate_log_params'
Dan Carley [Thu, 8 Mar 2012 15:57:01 +0000 (15:57 +0000)]
Merge branch '12897-validate_log_params'

(#12897) Require jump=>LOG for log params

13 years ago(#12897) Require jump=>LOG for log params
Daniel Black [Sun, 18 Dec 2011 09:16:19 +0000 (20:16 +1100)]
(#12897) Require jump=>LOG for log params

This validates that when log_prefix or log_level is specified the jump
should be 'LOG'

13 years agoMerge branch 'ticket/10165-port-commasep'
Ken Barber [Mon, 23 Jan 2012 17:18:26 +0000 (17:18 +0000)]
Merge branch 'ticket/10165-port-commasep'

* ticket/10165-port-commasep:
  (#10165) Display multi-value: port, sport, dport and state command seperated

13 years ago(#10165) Display multi-value: port, sport, dport and state command seperated
Daniel Black [Mon, 23 Jan 2012 05:55:44 +0000 (16:55 +1100)]
(#10165) Display multi-value: port, sport, dport and state command seperated

Previously the output that changed was munged when puppet was being ran, this
change provides a comma seperated output when the values change instead.

13 years agoMerge branch 'ticket/master/11673_ospf'
Ken Barber [Sun, 22 Jan 2012 19:40:15 +0000 (19:40 +0000)]
Merge branch 'ticket/master/11673_ospf'

* ticket/master/11673_ospf:
  (#11673) Adding OSPF(v3) protocol to puppetlabs-firewall

13 years ago(#11673) Adding OSPF(v3) protocol to puppetlabs-firewall
Arnoud Vermeer [Tue, 3 Jan 2012 09:59:28 +0000 (10:59 +0100)]
(#11673) Adding OSPF(v3) protocol to puppetlabs-firewall

Added support for ospf to the proto property.

13 years agoRevert "Merge pull request #34 from mediatemple/class-firewall"
Ken Barber [Fri, 13 Jan 2012 17:35:29 +0000 (17:35 +0000)]
Revert "Merge pull request #34 from mediatemple/class-firewall"

This reverts commit bfbf01b08d6cf05795dd9b69815e8556e95dcf07, reversing
changes made to 0b55830db9447d0398b6b346bf513dfa6e2ccd08.

This patch breaks the build, and wasn't ready for merge. The rspec test
scaffolding wasn't prepared and hasn't been tested with this module properly.

13 years agoMerge pull request #34 from mediatemple/class-firewall
Jonathan Boyett [Fri, 13 Jan 2012 17:11:24 +0000 (09:11 -0800)]
Merge pull request #34 from mediatemple/class-firewall

Initial creation of class firewall for issue #10984

13 years agoMerge pull request #50 from grooverdan/ticket/11443_fix_error_message
Ken Barber [Thu, 29 Dec 2011 11:05:16 +0000 (03:05 -0800)]
Merge pull request #50 from grooverdan/ticket/11443_fix_error_message

(#11443) simple fix of the error message for allowed values of the jump property