Skip to content

Conversation

clarkwalcott
Copy link

Tool Version

iptables v1.8.7 (nf_tables)

Description

iptables Delete and Check commands both fail if the command includes -A. Since the rules returned from List have -A <chain> in them, using these rules as the rulespec fails if you don't strip out that prefix.

The purpose of this PR is to enable both types of rulespec to work for Delete and Check commands.

e.g.
Delete

[iptables -t filter -D <chain> -A <chain> -i <interface_name> -j ACCEPT --wait]: exit status 2: iptables v1.8.7 (nf_tables): Cannot use -A with -D\n\nTry `iptables -h' or 'iptables --help' for more information.

Check

[iptables -t filter -C <chain> -A <chain> -i <interface_name> -j ACCEPT  --wait]: exit status 2: iptables v1.8.7 (nf_tables): Cannot use -A with -C\n\nTry `iptables -h' or 'iptables --help' for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant