-
Notifications
You must be signed in to change notification settings - Fork 334
Document the egress traffic supported for GA #1749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| This document specifies the supported egress traffic for [GA](https://github.com/agent-substrate/substrate/milestone/3). | ||
|
|
||
| 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. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #1689 only route TCP (except DNS-over-TCP) to atunnel. |
||
|
|
||
| ## TCP | ||
|
|
||
| | 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` | | ||
| | 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 | | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should reflect this after #1689 is merged
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this line aligns with #1689 currently |
||
| | 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. | | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keith Mattix II (@keithmattix) , yanavlasov, WDYT? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
|
||
| ## UDP | ||
|
|
||
|
|
||
| | Port | Traffic | Behavior | Path | What the actor sees when refused | | ||
| | :---- | :---- | :---- | :---- | :---- | | ||
| | 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. | | ||
|
Comment on lines
+23
to
+24
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should update this to reflect the state after #1689
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this line aligns with #1689 currently |
||
|
|
||
| ## 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. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
| ## Requesting support | ||
|
|
||
| If you would like Substrate to support egress traffic that is blocked above, please | ||
| [file an issue](https://github.com/agent-substrate/substrate/issues/new) | ||
| describing your use case. | ||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.