Skip to content

Commit

Permalink
fix: Prevent iptable list cmd to do reverse dns lookup (#2682)
Browse files Browse the repository at this point in the history
fix: While listing iptable rules added -n option to prevent reverse dns lookup
  • Loading branch information
tamilmani1989 authored Apr 12, 2024
1 parent 90909a2 commit bfa170e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iptables/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (c *Client) RunCmd(version, params string) error {

// check if iptable chain alreay exists
func (c *Client) ChainExists(version, tableName, chainName string) bool {
params := fmt.Sprintf("-t %s -L %s", tableName, chainName)
params := fmt.Sprintf("-t %s -nL %s", tableName, chainName)
if err := c.RunCmd(version, params); err != nil {
return false
}
Expand Down

0 comments on commit bfa170e

Please sign in to comment.