Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bidirectional ¶
Bidirectional takes groups of nodes and creates rules which isolate them from one another. For example, with arguments ([ip1], [ip2, ip3]), ip1 would not be able to talk to ip2 and ip3, and vice versa.
func Rules ¶
Rules translates a blacklist into a map of invocations of `iptables`, keyed by the node on which they need to be run. A blacklist is keyed by origin, the values being the nodes which will be blocked from receiving inbound connections from the origin. For example, {ip1: [ip2, ip3]} means that rules will be created at ip2 and ip3 which drop incoming connections from ip1. In particular, asymmetry is supported: ip2 and ip3 would continue to be able to connect to ip1. The commands don't stack; before applying new rules, run Reset() to clear up a previous partition.