egress: the forward chain accepts the flows the host publishes for the agents
On a host with the egress intercept on, the forward chain rejected an agent's traffic to the queue once the queue ran as a pod: the pod's hostPort rewrites the destination to the pod, and the packet then leaves the bridge for the cluster. The chain now accepts TCP that the host's NAT redirected whose original destination is the bridge's address at a published port, which the queue adds when it runs in the cluster. Everything else from the bridge to the cluster stays refused. The nats switch test runs with the intercept on.
This commit is contained in:
parent
7ef9444e42
commit
0d857b8ae1
1 changed files with 121 additions and 9 deletions
|
|
@ -757,6 +757,18 @@ also refuses the flow.
|
|||
`reject` doesn't 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.
|
||||
- **Published services.** After the `agent_allow` rule the chain accepts TCP
|
||||
that the host's own NAT redirected (`ct status dnat`) when the flow's
|
||||
original destination (`ct original`) is the bridge's address at a port in
|
||||
`services.hyperhive.deploy.hive-controller.egress.publishedPorts`, in both
|
||||
modes, so such a flow leaves no count and no line. A module that publishes a
|
||||
port adds it: the queue in the cluster adds its client port, because the
|
||||
pod's `hostPort` rewrites the destination to the pod and the packet then
|
||||
leaves the bridge for the cluster. An agent dials the queue's name, which the
|
||||
hive's resolver answers with the bridge's address. A flow to the pod's own
|
||||
address has no redirect, and one to the node's address has another original
|
||||
destination, so both stay refused. The set is empty, and the chain has no
|
||||
such rule, while no module publishes a port.
|
||||
- **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