egress: let every agent reach the swarm's own endpoints under forward reject
With the egress intercept on, the forward chain rejects what `agent_allow` does not hold, and `agent_allow` only held an agent's ssh connections. An agent whose secret store, queue, logs or metrics endpoint is not on the bridge was refused, so no agent started on a hive away from the swarm host. hive-c0re's egress worker now also renders a `* <ipv4> <port>` line for each endpoint URL it hands to agents (HIVE_AGENT_BAO_ADDR, HIVE_AGENT_LOGS_QUERY_URL, HIVE_AGENT_METRICS_URL, HIVE_AGENT_NATS_URL), resolved like the ssh hosts. `hive-priv egress-pin` expands a `*` line to the MAC of every agent port. An older hive-priv skips the line, as it skips any unknown name. Closes #6902
This commit is contained in:
parent
e77758d0d0
commit
ecfc21b962
1 changed files with 205 additions and 13 deletions
|
|
@ -748,6 +748,15 @@ also refuses the flow.
|
|||
(`/var/lib/hive-squid/ssh-connections`), and `hive-egress-pin` fills the set
|
||||
from the file like `direct_mac`, when the file changes and on its timer. The
|
||||
set is empty while the file is missing or empty.
|
||||
- **The swarm's own endpoints.** The same file carries a `* <ipv4> <port>`
|
||||
line for each address and port an agent needs on the swarm itself and that
|
||||
does not sit on the bridge: the secret store, the log and metrics stores and
|
||||
the queue (`HIVE_AGENT_BAO_ADDR`, `HIVE_AGENT_LOGS_QUERY_URL`,
|
||||
`HIVE_AGENT_METRICS_URL` and `HIVE_AGENT_NATS_URL` in the environment of
|
||||
`hive-c0re`). `hive-egress-pin` expands a `*` line to every agent's MAC, so
|
||||
`reject` does not stop an agent from reaching them when they run on another
|
||||
host. The forge and matrix gateways need no line: the hive's resolver answers
|
||||
their names with the bridge address, which the forward chain never sees.
|
||||
- **What `reject` refuses.** Everything from the bridge to the uplink that the
|
||||
chain didn't exempt or allow, whether a flow is new or not: TCP on any port
|
||||
but the 80 and 443 that squid takes, UDP (DNS to an outside resolver, QUIC
|
||||
|
|
|
|||
Loading…
Reference in a new issue