Skip to content

Instantly share code, notes, and snippets.

@supershabam
Created December 4, 2014 01:28
Show Gist options
  • Save supershabam/c9ee1663529a68c75453 to your computer and use it in GitHub Desktop.
Save supershabam/c9ee1663529a68c75453 to your computer and use it in GitHub Desktop.
-A INPUT -p tcp --dport ssh -j ACCEPT
-A INPUT -p tcp --dport 1337 -s group:leet -j ACCEPT
var groups = map[string][]string{
"leet": []string{"1.2.3.4", "4.3.2.1"},
}
yields
-A INPUT -p tcp --dport ssh -j ACCEPT
-A INPUT -p tcp --dport 1337 -s 1.2.3.4 -j ACCEPT
-A INPUT -p tcp --dport 1337 -s 4.3.2.1 -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment