egress: document the allowed ssh connections
This commit is contained in:
parent
8ece0b7e0b
commit
eab2dcb0a2
1 changed files with 73 additions and 19 deletions
|
|
@ -60,9 +60,11 @@ whole file, at that path. To work inside the agent's container instead, see
|
|||
key changed and you didn't change the machine, don't clear it: something else
|
||||
answers at that address.
|
||||
|
||||
This doesn't open the network. If you set the hive's `egress.forward` to
|
||||
`reject`, the hive refuses the agent's direct connection to the machine's port
|
||||
until a separate allowance exists; the default `log` lets it through. See
|
||||
The SSH switch and the CA don't open the network. The default `egress.forward`
|
||||
of `log` lets the agent's direct connection to the machine's port through. If
|
||||
you set it to `reject`, the hive refuses the connection unless you gave the
|
||||
agent a named connection to that host and port (see
|
||||
[Named connections](#named-connections)). See
|
||||
[the network page](../../4-implementation/networking/network.md).
|
||||
|
||||
## 2. Make a machine trust the CA
|
||||
|
|
@ -111,8 +113,16 @@ host and the port. For example `k8s-lab-vm`, `root`, `muede-pc2`, `2222`.
|
|||
The agent's ssh config then holds a `Host k8s-lab-vm` block with that host,
|
||||
user and port, and the connection uses the same certificate as any other. The
|
||||
block follows a change within ten seconds, and it's empty while the agent's SSH
|
||||
switch is off, so one switch ends both the certificate and the names. A name
|
||||
doesn't open the network: see the note under section 1. The routes and the
|
||||
switch is off, so one switch ends both the certificate and the names.
|
||||
|
||||
A named connection also lets the agent through the hive's egress rule. Under
|
||||
`egress.forward = "reject"` the hive accepts TCP from that agent to the host
|
||||
and port of each of its names, and from no other agent. The hive looks the
|
||||
host up itself, every ten minutes, and accepts every IPv4 address it answers
|
||||
with, except one inside its own agent bridge subnet. A name must therefore
|
||||
resolve on the hive host the way it does for you. If the lookup fails or
|
||||
hangs, the hive keeps the last answer. A new name, a removed one or a
|
||||
flipped switch reaches the hive's rule in about a minute. The routes and the
|
||||
rules a connection must meet are on
|
||||
[the SSH CA implementation page](../../4-implementation/swarm/ssh-ca.md#named-connections).
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue