inspec/test/fixtures/cmd/nftables-chain

8 lines
174 B
Text
Raw Normal View History

Add nftables resources (#6499) * Fix systemd path for Leap image Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * Use vhef client version 17 as doocker cookbook do not support >= 18 Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * Add nftables resource Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * Add nftables tests Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * Add fixtures for nftables tests Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * enable nftables only when attr is true - then disable iptables Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * By default test iptables, not nftables Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * Fix tests and lint errors Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * Increase unit test coverage for nftables Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * Do not use -nn nft option as behaviour changes based on nft version Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * Base nft params identification on its version, not os version Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * Make test more human friendly by reversing unless/if logic Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * Update mocked cmds with nft params Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * Fix quoting issue with rubocop Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * Fix uninitiallized class vars Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * Fix unit test by adding nft version mocking Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> * Clean nftables doc Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com> --------- Signed-off-by: Jeremy JACQUE <jeremy.jacque@algolia.com>
2023-05-16 00:05:01 +00:00
table inet filter {
chain INPUT {
type filter hook input priority 0; policy accept;
iifname "eth0" tcp dport 80 accept comment "http on 80"
jump derby-cognos-web
}
}