Skip to content

Commit 1ef615e

Browse files
authored
Merge branch 'puppetlabs:main' into main
2 parents 4d9aa74 + 5f675b3 commit 1ef615e

File tree

10 files changed

+69
-50
lines changed

10 files changed

+69
-50
lines changed

.github/workflows/mend.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: "mend"
22

33
on:
4-
pull_request:
5-
branches:
6-
- "main"
4+
pull_request_target:
5+
types:
6+
- opened
7+
- synchronize
78
schedule:
89
- cron: "0 0 * * *"
910
workflow_dispatch:

CHANGELOG.md

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,29 @@ All notable changes to this project will be documented in this file.
55

66
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
77

8+
## [v8.0.1](https://github.com/puppetlabs/puppetlabs-firewall/tree/v8.0.1) - 2024-03-20
9+
10+
[Full Changelog](https://github.com/puppetlabs/puppetlabs-firewall/compare/v8.0.0...v8.0.1)
11+
12+
### Fixed
13+
14+
- (MODULES-11449) - Fix for IPv6 NAT chain [#1201](https://github.com/puppetlabs/puppetlabs-firewall/pull/1201) ([Ramesh7](https://github.com/Ramesh7))
15+
16+
### Other
17+
18+
- fix typos in documentation [#1195](https://github.com/puppetlabs/puppetlabs-firewall/pull/1195) ([corporate-gadfly](https://github.com/corporate-gadfly))
19+
20+
## [v8.0.0](https://github.com/puppetlabs/puppetlabs-firewall/tree/v8.0.0) - 2024-02-08
21+
22+
[Full Changelog](https://github.com/puppetlabs/puppetlabs-firewall/compare/v7.0.2...v8.0.0)
23+
24+
### Changed
25+
- [CAT-1425] : Removing RedHat/Scientific/OracleLinux 6 [#1163](https://github.com/puppetlabs/puppetlabs-firewall/pull/1163) ([rajat-puppet](https://github.com/rajat-puppet))
26+
27+
### Fixed
28+
29+
- (GH-1164) Only common jump values should be enforced as upcase [#1165](https://github.com/puppetlabs/puppetlabs-firewall/pull/1165) ([david22swan](https://github.com/david22swan))
30+
831
## [v7.0.2](https://github.com/puppetlabs/puppetlabs-firewall/tree/v7.0.2) - 2023-09-14
932

1033
[Full Changelog](https://github.com/puppetlabs/puppetlabs-firewall/compare/v7.0.1...v7.0.2)
@@ -37,14 +60,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
3760

3861
[Full Changelog](https://github.com/puppetlabs/puppetlabs-firewall/compare/v5.0.0...v6.0.0)
3962

40-
### Added
41-
42-
- Add support for parsing and using --tcp-option [#1126](https://github.com/puppetlabs/puppetlabs-firewall/pull/1126) ([greatflyingsteve](https://github.com/greatflyingsteve))
43-
4463
### Changed
4564
- (CONT-242) Fix duplicate rule detection [#1140](https://github.com/puppetlabs/puppetlabs-firewall/pull/1140) ([david22swan](https://github.com/david22swan))
4665
- pdksync - (MAINT) - Require Stdlib 9.x only [#1135](https://github.com/puppetlabs/puppetlabs-firewall/pull/1135) ([LukasAud](https://github.com/LukasAud))
4766

67+
### Added
68+
69+
- Add support for parsing and using --tcp-option [#1126](https://github.com/puppetlabs/puppetlabs-firewall/pull/1126) ([greatflyingsteve](https://github.com/greatflyingsteve))
70+
4871
### Fixed
4972

5073
- disable firewalld for RedHat 9 [#1142](https://github.com/puppetlabs/puppetlabs-firewall/pull/1142) ([robertc99](https://github.com/robertc99))
@@ -88,13 +111,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
88111

89112
[Full Changelog](https://github.com/puppetlabs/puppetlabs-firewall/compare/v3.6.0...v4.0.0)
90113

114+
### Changed
115+
- (CONT-256) Removing outdated code [#1084](https://github.com/puppetlabs/puppetlabs-firewall/pull/1084) ([LukasAud](https://github.com/LukasAud))
116+
91117
### Added
92118

93119
- add support for using rpfilter in rules [#1059](https://github.com/puppetlabs/puppetlabs-firewall/pull/1059) ([cmusik](https://github.com/cmusik))
94120

95-
### Changed
96-
- (CONT-256) Removing outdated code [#1084](https://github.com/puppetlabs/puppetlabs-firewall/pull/1084) ([LukasAud](https://github.com/LukasAud))
97-
98121
### Fixed
99122

100123
- (CONT-173) - Updating deprecated facter instances [#1079](https://github.com/puppetlabs/puppetlabs-firewall/pull/1079) ([jordanbreen28](https://github.com/jordanbreen28))
@@ -326,13 +349,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
326349

327350
[Full Changelog](https://github.com/puppetlabs/puppetlabs-firewall/compare/1.15.3...v2.0.0)
328351

352+
### Changed
353+
- pdksync - (MODULES-8444) - Raise lower Puppet bound [#841](https://github.com/puppetlabs/puppetlabs-firewall/pull/841) ([david22swan](https://github.com/david22swan))
354+
329355
### Added
330356

331357
- (FM-7903) - Implement Puppet Strings [#838](https://github.com/puppetlabs/puppetlabs-firewall/pull/838) ([david22swan](https://github.com/david22swan))
332358

333-
### Changed
334-
- pdksync - (MODULES-8444) - Raise lower Puppet bound [#841](https://github.com/puppetlabs/puppetlabs-firewall/pull/841) ([david22swan](https://github.com/david22swan))
335-
336359
### Fixed
337360

338361
- (MODULES-8736) IPtables support on RHEL8 [#824](https://github.com/puppetlabs/puppetlabs-firewall/pull/824) ([EmilienM](https://github.com/EmilienM))
@@ -438,6 +461,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
438461

439462
[Full Changelog](https://github.com/puppetlabs/puppetlabs-firewall/compare/1.9.0...1.10.0)
440463

464+
### Changed
465+
- (MODULES-5501) - Remove unsupported Ubuntu [#715](https://github.com/puppetlabs/puppetlabs-firewall/pull/715) ([pmcmaw](https://github.com/pmcmaw))
466+
- (Modules-1141) No longer accepts an array for icmp types #puppethack [#705](https://github.com/puppetlabs/puppetlabs-firewall/pull/705) ([spynappels](https://github.com/spynappels))
467+
441468
### Added
442469

443470
- (MODULES-5144) Prep for puppet 5 [#709](https://github.com/puppetlabs/puppetlabs-firewall/pull/709) ([hunner](https://github.com/hunner))
@@ -446,10 +473,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
446473
- MODULES-4828 version_requirement updated #puppethack [#704](https://github.com/puppetlabs/puppetlabs-firewall/pull/704) ([neilbinney](https://github.com/neilbinney))
447474
- Add gid lookup [#682](https://github.com/puppetlabs/puppetlabs-firewall/pull/682) ([crispygoth](https://github.com/crispygoth))
448475

449-
### Changed
450-
- (MODULES-5501) - Remove unsupported Ubuntu [#715](https://github.com/puppetlabs/puppetlabs-firewall/pull/715) ([pmcmaw](https://github.com/pmcmaw))
451-
- (Modules-1141) No longer accepts an array for icmp types #puppethack [#705](https://github.com/puppetlabs/puppetlabs-firewall/pull/705) ([spynappels](https://github.com/spynappels))
452-
453476
### Fixed
454477

455478
- [MODULES-5924] Fix unmanaged rule regex when updating a iptable. [#729](https://github.com/puppetlabs/puppetlabs-firewall/pull/729) ([sathlan](https://github.com/sathlan))
@@ -502,16 +525,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
502525

503526
[Full Changelog](https://github.com/puppetlabs/puppetlabs-firewall/compare/1.8.0...1.8.1)
504527

528+
### Changed
529+
- (maint) Remove nat flush [#625](https://github.com/puppetlabs/puppetlabs-firewall/pull/625) ([hunner](https://github.com/hunner))
530+
505531
### Added
506532

507533
- (Modules 3329) Add support for iptables length and string extensions [#630](https://github.com/puppetlabs/puppetlabs-firewall/pull/630) ([shumbert](https://github.com/shumbert))
508534
- Add VirtuozzoLinux to the RedHat family [#617](https://github.com/puppetlabs/puppetlabs-firewall/pull/617) ([jpnc](https://github.com/jpnc))
509535
- support for multiple ipsets in a rule [#615](https://github.com/puppetlabs/puppetlabs-firewall/pull/615) ([nabam](https://github.com/nabam))
510536
- Add 'ip' and 'pim' to proto [#610](https://github.com/puppetlabs/puppetlabs-firewall/pull/610) ([lunkwill42](https://github.com/lunkwill42))
511537

512-
### Changed
513-
- (maint) Remove nat flush [#625](https://github.com/puppetlabs/puppetlabs-firewall/pull/625) ([hunner](https://github.com/hunner))
514-
515538
### Fixed
516539

517540
- allow FreeBSD when dependencies require this class [#624](https://github.com/puppetlabs/puppetlabs-firewall/pull/624) ([rcalixte](https://github.com/rcalixte))
@@ -662,6 +685,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
662685

663686
[Full Changelog](https://github.com/puppetlabs/puppetlabs-firewall/compare/1.1.3...1.2.0)
664687

688+
### Changed
689+
- Doesn't actually support OEL5 [#418](https://github.com/puppetlabs/puppetlabs-firewall/pull/418) ([underscorgan](https://github.com/underscorgan))
690+
665691
### Added
666692

667693
- Update to support PE3.x [#420](https://github.com/puppetlabs/puppetlabs-firewall/pull/420) ([underscorgan](https://github.com/underscorgan))
@@ -671,9 +697,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
671697
- add ipset support [#383](https://github.com/puppetlabs/puppetlabs-firewall/pull/383) ([vzctl](https://github.com/vzctl))
672698
- Add support for mac address source rules pt2 [#337](https://github.com/puppetlabs/puppetlabs-firewall/pull/337) ([damjanek](https://github.com/damjanek))
673699

674-
### Changed
675-
- Doesn't actually support OEL5 [#418](https://github.com/puppetlabs/puppetlabs-firewall/pull/418) ([underscorgan](https://github.com/underscorgan))
676-
677700
### Fixed
678701

679702
- ip6tables isn't supported on EL5 [#428](https://github.com/puppetlabs/puppetlabs-firewall/pull/428) ([underscorgan](https://github.com/underscorgan))
@@ -704,13 +727,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
704727

705728
[Full Changelog](https://github.com/puppetlabs/puppetlabs-firewall/compare/1.0.2...1.1.0)
706729

730+
### Changed
731+
- Apply firewall resources alphabetically [#342](https://github.com/puppetlabs/puppetlabs-firewall/pull/342) ([mcanevet](https://github.com/mcanevet))
732+
707733
### Added
708734

709735
- (MODULES-689) Add support for connlimit and connmark [#344](https://github.com/puppetlabs/puppetlabs-firewall/pull/344) ([csschwe](https://github.com/csschwe))
710736

711-
### Changed
712-
- Apply firewall resources alphabetically [#342](https://github.com/puppetlabs/puppetlabs-firewall/pull/342) ([mcanevet](https://github.com/mcanevet))
713-
714737
### Fixed
715738

716739
- Fix access to distmoduledir [#354](https://github.com/puppetlabs/puppetlabs-firewall/pull/354) ([hunner](https://github.com/hunner))
@@ -779,11 +802,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
779802

780803
[Full Changelog](https://github.com/puppetlabs/puppetlabs-firewall/compare/0.4.1...0.4.2)
781804

782-
### Fixed
783-
784-
- Only workaround if we're using the old package. [#233](https://github.com/puppetlabs/puppetlabs-firewall/pull/233) ([mrwacky42](https://github.com/mrwacky42))
785-
- 22090 - Use list of RedHat OSes from newer facter. [#232](https://github.com/puppetlabs/puppetlabs-firewall/pull/232) ([mrwacky42](https://github.com/mrwacky42))
786-
787805
## [0.4.1](https://github.com/puppetlabs/puppetlabs-firewall/tree/0.4.1) - 2013-08-12
788806

789807
[Full Changelog](https://github.com/puppetlabs/puppetlabs-firewall/compare/0.4.0...0.4.1)
@@ -870,26 +888,21 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
870888

871889
- Mock Resolv.getaddress in #host_to_ip [#110](https://github.com/puppetlabs/puppetlabs-firewall/pull/110) ([dcarley](https://github.com/dcarley))
872890
- ip6tables provider allways execute /sbin/iptables command [#105](https://github.com/puppetlabs/puppetlabs-firewall/pull/105) ([wuwx](https://github.com/wuwx))
873-
- (#16004) array_matching is contraindicated. [#100](https://github.com/puppetlabs/puppetlabs-firewall/pull/100) ([mrwacky42](https://github.com/mrwacky42))
874891
- (#10322) Insert order hash included chains from different tables [#89](https://github.com/puppetlabs/puppetlabs-firewall/pull/89) ([kbarber](https://github.com/kbarber))
875892
- (#10274) Nullify addresses with zero prefixlen [#80](https://github.com/puppetlabs/puppetlabs-firewall/pull/80) ([dcarley](https://github.com/dcarley))
876-
- (#14641) Fix for incorrect limit command arguments for ip6tables provider [#79](https://github.com/puppetlabs/puppetlabs-firewall/pull/79) ([cheethoe](https://github.com/cheethoe))
877893
- Ticket/10619 unable to purge rules [#69](https://github.com/puppetlabs/puppetlabs-firewall/pull/69) ([kbarber](https://github.com/kbarber))
878894
- (#13201) Firewall autorequire Firewallchains [#67](https://github.com/puppetlabs/puppetlabs-firewall/pull/67) ([dcarley](https://github.com/dcarley))
879895
- (#13192) Fix allvalidchain iteration [#63](https://github.com/puppetlabs/puppetlabs-firewall/pull/63) ([kbarber](https://github.com/kbarber))
880896
- Improved Puppet DSL style as per the guidelines. [#61](https://github.com/puppetlabs/puppetlabs-firewall/pull/61) ([adamgibbins](https://github.com/adamgibbins))
881897
- (#10164) Reject and document icmp => "any" [#60](https://github.com/puppetlabs/puppetlabs-firewall/pull/60) ([dcarley](https://github.com/dcarley))
882898
- (#11443) simple fix of the error message for allowed values of the jump property [#50](https://github.com/puppetlabs/puppetlabs-firewall/pull/50) ([grooverdan](https://github.com/grooverdan))
883-
- Initial creation of class firewall for issue #10984 [#34](https://github.com/puppetlabs/puppetlabs-firewall/pull/34) ([mrwacky42](https://github.com/mrwacky42))
884899

885900
## [v0.0.4](https://github.com/puppetlabs/puppetlabs-firewall/tree/v0.0.4) - 2011-12-05
886901

887902
[Full Changelog](https://github.com/puppetlabs/puppetlabs-firewall/compare/v0.0.3...v0.0.4)
888903

889904
### Added
890905

891-
- (#10997) Add fixtures for ipencap [#39](https://github.com/puppetlabs/puppetlabs-firewall/pull/39) ([mrwacky42](https://github.com/mrwacky42))
892-
- Add owner-match support [#38](https://github.com/puppetlabs/puppetlabs-firewall/pull/38) ([mrwacky42](https://github.com/mrwacky42))
893906
- (#10690) add port property support to ip6tables [#33](https://github.com/puppetlabs/puppetlabs-firewall/pull/33) ([saysjonathan](https://github.com/saysjonathan))
894907

895908
## [v0.0.3](https://github.com/puppetlabs/puppetlabs-firewall/tree/v0.0.3) - 2011-11-12

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ As part of this process several breaking changes where made to the code that wil
568568
* Attributes that allow both arrays and negated values have now been updated.
569569
* For attributes that require that all passed values be negated as one, you now merely have to negate the first value within the array, rather than all of them, though negating all is still accepted.
570570
* For attributes that allow passed values to be negated seperately this is not the case. All attributes in this situation are noted within their description.
571-
* The `sport` and `dport` attributes have been updated so that they will now accept with `:` or `-` as a separator when passing ranges, with `:` being preferred as it matchs what is passed to iptables.
571+
* The `sport` and `dport` attributes have been updated so that they will now accept with `:` or `-` as a separator when passing ranges, with `:` being preferred as it matches what is passed to iptables.
572572

573573
Two pairs of manifest taken from the tests can be seen below, illustrating the changes that may be required, the first applying a hoplimit on `ip6tables`:
574574

REFERENCE.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,7 @@ Data type: `Optional[Variant[String[1], Integer]]`
730730

731731
##### `goto`
732732

733-
Data type: `Optional[Pattern[/^[a-zA-Z0-9_]+$/]]`
734-
_*this data type contains a regex that may not be accurately reflected in generated documentation_
733+
Data type: `Optional[String[1]]`
735734

736735
The value for the iptables --goto parameter. Normal values are:
737736

@@ -927,16 +926,15 @@ Data type: `Optional[Boolean]`
927926

928927
##### `jump`
929928

930-
Data type: `Optional[Pattern[/^[a-zA-Z0-9_]+$/]]`
931-
_*this data type contains a regex that may not be accurately reflected in generated documentation_
929+
Data type: `Optional[String[1]]`
932930

933931
This value for the iptables --jump parameter and the action to perform on a match. Common values are:
934932

935933
* ACCEPT - the packet is accepted
936934
* REJECT - the packet is rejected with a suitable ICMP response
937935
* DROP - the packet is dropped
938936

939-
But can also be on of the following:
937+
But can also be one of the following:
940938

941939
* QUEUE
942940
* RETURN

lib/puppet/provider/firewallchain/firewallchain.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ def self.verify(_is, should)
172172
raise ArgumentError, 'PREROUTING, POSTROUTING, INPUT, FORWARD and OUTPUT are the only inbuilt chains that can be used in table \'mangle\'' if %r{^(BROUTING)$}.match?(should[:chain])
173173
when 'nat'
174174
raise ArgumentError, 'PREROUTING, POSTROUTING, INPUT, and OUTPUT are the only inbuilt chains that can be used in table \'nat\'' if %r{^(BROUTING|FORWARD)$}.match?(should[:chain])
175-
raise ArgumentError, 'table nat isn\'t valid in IPv6. You must specify \':IPv4\' as the name suffix' if %r{^(IP(v6)?)?$}.match?(should[:protocol])
176175
when 'raw'
177176
raise ArgumentError, 'PREROUTING and OUTPUT are the only inbuilt chains in the table \'raw\'' if %r{^(POSTROUTING|BROUTING|INPUT|FORWARD)$}.match?(should[:chain])
178177
when 'broute'

lib/puppet/type/firewall.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@
10021002
* REJECT - the packet is rejected with a suitable ICMP response
10031003
* DROP - the packet is dropped
10041004
1005-
But can also be on of the following:
1005+
But can also be one of the following:
10061006
10071007
* QUEUE
10081008
* RETURN

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "puppetlabs-firewall",
3-
"version": "7.0.2",
3+
"version": "8.0.1",
44
"author": "puppetlabs",
55
"summary": "Manages Firewalls such as iptables",
66
"license": "Apache-2.0",

spec/acceptance/firewallchain_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,18 @@
8282
end
8383
end
8484
end
85+
86+
context 'with NAT chain' do
87+
pp3 = <<-PUPPETCODE
88+
firewallchain { 'MY_CHAIN:nat:IPv6':
89+
ensure => present,
90+
}
91+
PUPPETCODE
92+
it 'applies cleanly' do
93+
# Run it twice and test for idempotency
94+
idempotent_apply(pp3)
95+
end
96+
end
8597
end
8698

8799
# XXX purge => false is not yet implemented

spec/acceptance/resource_cmd_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
run_shell('source /etc/profile.d/my-custom.lang.sh')
2121
end
2222
run_shell('echo export LC_ALL="C" >> ~/.bashrc')
23-
run_shell('source ~/.bashrc')
23+
run_shell('source ~/.bashrc || true')
2424
end
2525

2626
context 'when make sure it returns no errors when executed on a clean machine' do

spec/unit/puppet/provider/firewallchain/firewallchain_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,6 @@
316316
should: { name: 'FORWARD:nat:IPv4', chain: 'FORWARD', table: 'nat', protocol: 'IPv4', ensure: 'present', policy: 'accept' },
317317
error: 'PREROUTING, POSTROUTING, INPUT, and OUTPUT are the only inbuilt chains that can be used in table \'nat\''
318318
},
319-
{
320-
should: { name: 'PREROUTING:nat:IPv6', chain: 'PREROUTING', table: 'nat', protocol: 'IPv6', ensure: 'present', policy: 'accept' },
321-
error: 'table nat isn\'t valid in IPv6. You must specify \':IPv4\' as the name suffix'
322-
},
323319
{
324320
should: { name: 'INPUT:raw:IPv4', chain: 'INPUT', table: 'raw', protocol: 'IPv4', ensure: 'present', policy: 'accept' },
325321
error: 'PREROUTING and OUTPUT are the only inbuilt chains in the table \'raw\''

0 commit comments

Comments
 (0)