-
Notifications
You must be signed in to change notification settings - Fork 261
Open
Description
I am using go-iptables v0.4.5,
The following function returns false for existing rules.
// Exists checks if given rulespec in specified table/chain exists
func (ipt *IPTables) Exists(table, chain string, rulespec ...string) (bool, error) {
My application is deployed on a node running ubuntu 20.04.1 LTS release.
For the below arg, the exists method return false whereas checking it manually I see it there.
table: filter, Chain: CUSTOM_CHAIN, rule: [-m comment --comment "Comment text" -j ACCEPT]
Also, the List(table, chain) method call works as expected and I am able to find my rule in its return value.
root@test-worker:/# iptables -t filter -C CUSTOM_CHAIN -m comment --comment "Comment text" -j ACCEPT
root@test-worker:/# echo $?
0
Metadata
Metadata
Assignees
Labels
No labels