Closed Adam0Brien closed 2 months ago
Fix: #97 feat: users now have the option to delete a specific rule.
Rule numbers can be found by using the following command: sudo iptables -t nat -L PREROUTING -n --line-number
sudo iptables -t nat -L PREROUTING -n --line-number
Example usage:
table := "nat" chain := "PREROUTING" ruleIDToDelete := 2 // Use the DeleteById function to delete the rule. result, err := iptables.DeleteById(table, chain, ruleIDToDelete) if err != nil { fmt.Printf("Error: %v\n", err) } else { fmt.Println(result) }
Fix: #97 feat: users now have the option to delete a specific rule.
Rule numbers can be found by using the following command:
sudo iptables -t nat -L PREROUTING -n --line-number
Example usage: