Skip to content

Commit 2ef3ddc

Browse files
authored
Merge pull request #1191 from jcharaoui/firewallchain-cmd-fix
Support ip[6]tables protocol in firewallchain
2 parents 7644792 + aa1fd48 commit 2ef3ddc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/puppet/provider/firewallchain/firewallchain.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ class Puppet::Provider::Firewallchain::Firewallchain
99
# Command to list all chains and rules
1010
$list_command = {
1111
'IPv4' => 'iptables-save',
12-
'IPv6' => 'ip6tables-save'
12+
'iptables' => 'iptables-save',
13+
'IPv6' => 'ip6tables-save',
14+
'ip6tables' => 'ip6tables-save'
1315
}
1416
# Regex used to divide output of$list_command between tables
1517
$table_regex = %r{(\*(?:nat|mangle|filter|raw|rawpost|broute|security)[^*]+)}
@@ -20,7 +22,9 @@ class Puppet::Provider::Firewallchain::Firewallchain
2022
# Base commands for the protocols, including table affixes
2123
$base_command = {
2224
'IPv4' => 'iptables -t',
23-
'IPv6' => 'ip6tables -t'
25+
'iptables' => 'iptables -t',
26+
'IPv6' => 'ip6tables -t',
27+
'ip6tables' => 'ip6tables -t',
2428
}
2529
# Command to create a chain
2630
$chain_create_command = '-N'

0 commit comments

Comments
 (0)