* `bpf`: The ability to use Berkeley Paket Filter rules.
+* `ipvs`: The ability to match IP Virtual Server packets.
+
#### Parameters
* `action`: This is the action to perform on a match. Valid values for this action are:
* `ipset`: Matches IP sets. Value must be 'ipset_name (src|dst|src,dst)' and can be negated by putting ! in front. Requires ipset kernel module. Will accept a single element or an array.
+* `ipvs`: Matches packets belonging to an IP Virtual server connection.
+
* `isfirstfrag`: If true, matches when the packet is the first fragment of a fragmented ipv6 packet. Cannot be negated. Supported by ipv6 only. Valid values are 'true', 'false'. Requires the `isfirstfrag` feature.
* `isfragment`: If 'true', matches when the packet is a tcp fragment of a fragmented packet. Supported by iptables only. Valid values are 'true', 'false'. Requires features `isfragment`.
:month_days, :week_days, :date_start, :date_stop, :time_contiguous, :kernel_timezone,
:src_cc, :dst_cc, :hashlimit_upto, :hashlimit_above, :hashlimit_name, :hashlimit_burst,
:hashlimit_mode, :hashlimit_srcmask, :hashlimit_dstmask, :hashlimit_htable_size,
- :hashlimit_htable_max, :hashlimit_htable_expire, :hashlimit_htable_gcinterval, :bytecode, :name
+ :hashlimit_htable_max, :hashlimit_htable_expire, :hashlimit_htable_gcinterval, :bytecode, :ipvs, :name
]
def insert
desc <<-PUPPETCODE
Indicates that the current packet belongs to an IPVS connection.
PUPPETCODE
+ newvalues(:true, :false)
end
autorequire(:firewallchain) do
}
firewall { '1002 - set ipvs':
proto => 'tcp',
- dport => '4321',
- chain => 'OUTPUT',
+ action => accept,
+ chain => 'INPUT',
+ ipvs => true,
}
PUPPETCODE
apply_manifest(pp, catch_failures: true)
it 'jump is set' do
expect(result.stdout).to match(%r{-A INPUT -p tcp -m comment --comment "567 - jump" -j TEST})
end
+ it 'ipvs is set' do
+ expect(result.stdout).to match(%r{-A INPUT -p tcp -m ipvs --ipvs -m comment --comment "1002 - set ipvs" -j ACCEPT})
+ end
end
end