bytecode: '-m bpf --bytecode',
zone: '--zone',
helper: '--helper',
+ notrack: '--notrack',
}
# These are known booleans that do not take a value, but we want to munge
:time_contiguous,
:kernel_timezone,
:queue_bypass,
+ :notrack,
]
# Properties that use "-m <ipt module name>" (with the potential to have multiple
:set_mark, :match_mark, :connlimit_above, :connlimit_mask, :connmark, :time_start, :time_stop, :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, :zone, :helper, :rpfilter, :name]
+ :hashlimit_htable_max, :hashlimit_htable_expire, :hashlimit_htable_gcinterval, :bytecode, :zone, :helper, :rpfilter, :name, :notrack]
end
zone: '--zone',
helper: '--helper',
cgroup: '-m cgroup --cgroup',
+ notrack: '--notrack',
}
# These are known booleans that do not take a value, but we want to munge
:clusterip_new,
:queue_bypass,
:ipvs,
+ :notrack,
]
# Properties that use "-m <ipt module name>" (with the potential to have multiple
: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,
+<<<<<<< HEAD
:hashlimit_htable_max, :hashlimit_htable_expire, :hashlimit_htable_gcinterval, :bytecode, :ipvs, :zone, :helper, :cgroup,
:rpfilter, :name
+=======
+ :hashlimit_htable_max, :hashlimit_htable_expire, :hashlimit_htable_gcinterval, :bytecode, :ipvs, :zone, :helper, :rpfilter, :name, :notrack,
+>>>>>>> 6124426... Add --notrack flag
]
def insert
PUPPETCODE
end
+ newproperty(:notrack, required_features: :ct_target) do
+ # use this parameter with latest version of iptables
+ desc <<-PUPPETCODE
+ Invoke the disable connection tracking for this packet.
+ PUPPETCODE
+ newvalues(:true, :false)
+ end
+
autorequire(:firewallchain) do
reqs = []
protocol = nil
end
end
+ if value(:notrack)
+ unless value(:jump).to_s == 'CT'
+ raise 'Parameter notrack requires jump => CT'
+ end
+ end
+
if value(:jump).to_s == 'CT'
unless value(:table).to_s =~ %r{raw}
raise 'Parameter jump => CT only applies to table => raw'