Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
and look for the command you are to add if it's not yet there? Imo it's the simplest way. You have all the -A commands as a set of templates anyway..
Or just iptables -D before you do iptables -A ?
sbiewald3542242dRedis, might be faster than a database, but a hashset might work as well, but isn't persistent.
netikras23378242dI would not be persisting those rules. Neither in db nor a file or memory. It's very easy to get out of sync and have a split brain situation.
I'd be checking on the machine before each addition.
Otherwise you think the server knows, when in fact the server only thinks it knows. Too unreliable