Skip to content

Document the egress traffic supported for GA - #1749

Open
haiyanmeng wants to merge 1 commit into
agent-substrate:mainfrom
haiyanmeng:egress-supported-traffic-ga
Open

haiyanmeng wants to merge 1 commit into
agent-substrate:mainfrom
haiyanmeng:egress-supported-traffic-ga

Conversation

@haiyanmeng

@haiyanmeng haiyanmeng commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Record which egress protocols are allowed, which are allowed only under policy controls, and which are blocked, along with the data path each one takes. Having this written down gives users a single place to check what Substrate lets an actor reach, and gives us a checklist to implement and test against before GA.

Point readers at the issue tracker so that requests for traffic we do not yet support arrive with a use case attached.

Address #1339

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

Comment thread docs/egress-traffic.md Outdated

| Port | Traffic | Behavior | Path | What the actor sees when refused |
| :---- | :---- | :---- | :---- | :---- |
| any | HTTP(S) 1.1 / 2 | Supported with policy controls | atunnel -> egress gateway -> origin | `403 Forbidden` with body `egress denied`. |

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we should mandate the response body here

Comment thread docs/egress-traffic.md
| any | WebSocket | Blocked | n/a | `403 Forbidden` with an empty body. |
| any | Standard HTTP(S) CONNECT (forward-proxy tunnel) | Blocked | n/a | `403 Forbidden` with an empty body. |
| 53 | DNS | Allowed via netfilter rules | nftables -> node-configured DNS | n/a |
| any | Any other TCP | Blocked | n/a | The connection is accepted and then closed with no bytes returned. There is no status code. atunnel logs the failure. |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should send an RST by setting SO_LINGER to 0 on close vs having a normal FIN close.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit complicated. Actor's connection is inside the CONNECT tunnel. Egress Gateway can close the CONNECT abortively. For H/2 it is closed with RTS_STREAM and for H/1 TCP connection is closed abortively with RST. However the iptables interceptor that initiated CONNECT needs to translate these events into abortive close for the TCP connection from actor. I think Envoy already has the functionality it needs, but I'm not 100% sure. The atunnel client will need to have support for this as well.

We could work toward making this be the behavior for GA.

Comment thread docs/egress-traffic.md Outdated
Comment thread docs/egress-traffic.md Outdated
Record which egress protocols are allowed, which are allowed only under
policy controls, and which are blocked, along with the data path each one
takes. Having this written down gives users a single place to check what
Substrate lets an actor reach, and gives us a checklist to implement and
test against before GA.

Point readers at the issue tracker so that requests for traffic we do not
yet support arrive with a use case attached.
@haiyanmeng
haiyanmeng force-pushed the egress-supported-traffic-ga branch from 426b52f to 90e534e Compare September 18, 2026 21:51
Comment thread docs/egress-traffic.md
Comment on lines +3 to +4
Actor TCP egress (except DNS traffic on port 53) is redirected to atunnel,
which opens a CONNECT tunnel to the egress gateway. Egress gateway applies policy.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with #1689 all will be redirected to atunnel, maybe we removed that?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1689 does not redirect DNS-over-TCP traffic to atunnel.

Comment thread docs/egress-traffic.md
Actor TCP egress (except DNS traffic on port 53) is redirected to atunnel,
which opens a CONNECT tunnel to the egress gateway. Egress gateway applies policy.

DNS-over-TCP, UDP and other traffic is filtered by nftables and never reaches the gateway.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are also going to atunnel with #1689. they never reach the gateway though and are exempt from egresspolicy

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1689 only route TCP (except DNS-over-TCP) to atunnel.

Comment thread docs/egress-traffic.md

## Other transports

Everything that is neither TCP nor UDP is blocked. Packets are dropped, not rejected: no ICMP port-unreachable is sent, so the client hangs until its own timeout.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either we say, future version can look into ICMP rejection messages for verbosity or we drop ICMP from here

Comment thread docs/egress-traffic.md
Comment on lines +23 to +24
| 53 | DNS | Allowed via netfilter rules | nftables -> node-configured DNS | n/a |
| any other | Any other UDP | Blocked | n/a | Packets are dropped, not rejected: no ICMP port-unreachable is sent, so the client hangs until its own timeout. |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should update this to reflect the state after #1689
cc: Benjamin Elder (@BenTheElder)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this line aligns with #1689 currently

Comment thread docs/egress-traffic.md
| any | HTTP(S) 1.1 / 2 | Supported with policy controls | atunnel -> egress gateway -> origin | `403 Forbidden` |
| any | WebSocket | Blocked | n/a | `403 Forbidden` |
| any | Standard HTTP(S) CONNECT (forward-proxy tunnel) | Blocked | n/a | `403 Forbidden` |
| 53 | DNS | Allowed via netfilter rules | nftables -> node-configured DNS | n/a |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should reflect this after #1689 is merged

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this line aligns with #1689 currently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/network kind/docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants