Skip to content

lds: Add "transparent" option to support iptables TPROXY in listeners#522

Merged
htuch merged 3 commits intoenvoyproxy:masterfrom
rlenglet:lds-transparent-option
Mar 6, 2018
Merged

lds: Add "transparent" option to support iptables TPROXY in listeners#522
htuch merged 3 commits intoenvoyproxy:masterfrom
rlenglet:lds-transparent-option

Conversation

@rlenglet
Copy link
Copy Markdown
Contributor

@rlenglet rlenglet commented Mar 5, 2018

Add a "transparent" option to Listener to set the SOL_IP/IP_TRANSPARENT option on listen sockets, which allows using Envoy with the iptables TPROXY target.
Unlike the iptables REDIRECT target, TPROXY allows preserving both the source and destination IP addresses and ports of accepted connections.

API changes for: envoyproxy/envoy#2719

Signed-off-by: Romain Lenglet romain@covalent.io

Signed-off-by: Romain Lenglet <romain@covalent.io>

// Whether the listener should be set as a transparent socket. When this flag is set to true,
// connections can be redirected to the listener using an *iptables* *TPROXY* target, in which
// case the original source and destination addresses and ports are preserved on acccepted
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: typo accepted

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Signed-off-by: Romain Lenglet <romain@covalent.io>
// connections can be redirected to the listener using an *iptables* *TPROXY* target, in which
// case the original source and destination addresses and ports are preserved on accepted
// connections. Requires Envoy to run with the *CAP_NET_ADMIN* capability. Defaults to false.
google.protobuf.BoolValue transparent = 10;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should just be bool if the default is false. Can you add details to the commit message on the motivation for this feature? Thanks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Signed-off-by: Romain Lenglet <romain@covalent.io>
Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Thanks!

@htuch htuch merged commit 4702452 into envoyproxy:master Mar 6, 2018
@rlenglet rlenglet deleted the lds-transparent-option branch March 6, 2018 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants