Skip to content
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

[vnet] windows ip and route configuration #51690

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

nklaassen
Copy link
Contributor

@nklaassen nklaassen commented Jan 30, 2025

Part of RFD 195.

This PR adds OS configuration for VNet on Windows. Specifically, the TUN interface is now configured with a V6 and V4 IP address, and IP routes are configured so that IP packets in the VNet IP ranges for each cluster are routed to the TUN interface and handled by VNet.

This PR does not configure the VNet DNS nameserver on Windows, that will come in a following PR.

With these changes, VNet kind of works, without DNS. You can manually query the IP address of VNet's DNS server and get back a v4 and v6 address for the app. TCP connections to either of these addresses then work for connecting to the app.

@nklaassen nklaassen added no-changelog Indicates that a PR does not require a changelog entry vnet backport/branch/v17 labels Jan 30, 2025
Copy link
Contributor

@flyinghermit flyinghermit left a comment

Choose a reason for hiding this comment

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

LGTM

"golang.zx2c4.com/wireguard/tun"
)

const (
tunInterfaceName = "TeleportVNet"
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we can reuse the service name defined in https://github.com/gravitational/teleport/blob/master/lib/vnet/service_windows.go#L36.
If we want a different name for the tun, maybe spell out TeleportVNetTUN

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think i'll leave it as-is they are separate concepts that just happen to be the same string, i prefer naming the TUN interface just TeleportVNet

@nklaassen nklaassen force-pushed the nklaassen/windows-run-osconfig branch from c3e05c8 to d646d38 Compare February 5, 2025 20:32
@nklaassen nklaassen force-pushed the nklaassen/windows-osconfig branch from cfff7f3 to af60426 Compare February 5, 2025 20:33
@nklaassen nklaassen force-pushed the nklaassen/windows-run-osconfig branch from d646d38 to 0dee98d Compare February 5, 2025 22:14
@nklaassen nklaassen force-pushed the nklaassen/windows-osconfig branch from af60426 to 4c4d5d3 Compare February 5, 2025 22:14
Base automatically changed from nklaassen/windows-run-osconfig to master February 5, 2025 23:09
This PR adds OS configuration for VNet on Windows.
Specifically, the TUN interface is now configured with a V6 and V4 IP
address, and IP routes are configured so that IP packets in the VNet IP
ranges for each cluster are routed to the TUN interface and handled by
VNet.

This PR does *not* configure the VNet DNS nameserver on Windows, that
will come in a following PR.

With these changes, VNet kind of works, without DNS. You can manually
query the IP address of VNet's DNS server and get back a v4 and v6
address for the app. TCP connections to either of these addresses then
work for connecting to the app.
@nklaassen nklaassen force-pushed the nklaassen/windows-osconfig branch from 4c4d5d3 to 9b6d12f Compare February 5, 2025 23:14
@nklaassen nklaassen enabled auto-merge February 5, 2025 23:16
@nklaassen nklaassen added this pull request to the merge queue Feb 5, 2025
Merged via the queue into master with commit 71d2645 Feb 5, 2025
41 checks passed
@nklaassen nklaassen deleted the nklaassen/windows-osconfig branch February 5, 2025 23:54
@public-teleport-github-review-bot

@nklaassen See the table below for backport results.

Branch Result
branch/v17 Failed

nklaassen added a commit that referenced this pull request Feb 6, 2025
nklaassen added a commit that referenced this pull request Feb 6, 2025
nklaassen added a commit that referenced this pull request Feb 6, 2025
github-merge-queue bot pushed a commit that referenced this pull request Feb 7, 2025
carloscastrojumo pushed a commit to carloscastrojumo/teleport that referenced this pull request Feb 19, 2025
This PR adds OS configuration for VNet on Windows.
Specifically, the TUN interface is now configured with a V6 and V4 IP
address, and IP routes are configured so that IP packets in the VNet IP
ranges for each cluster are routed to the TUN interface and handled by
VNet.

This PR does *not* configure the VNet DNS nameserver on Windows, that
will come in a following PR.

With these changes, VNet kind of works, without DNS. You can manually
query the IP address of VNet's DNS server and get back a v4 and v6
address for the app. TCP connections to either of these addresses then
work for connecting to the app.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v17 no-changelog Indicates that a PR does not require a changelog entry size/md vnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants