Skip to content

Add Linux VNet systemd, dbus, polkit files to the teleport-connect package#64362

Merged
tangyatsu merged 1 commit intomasterfrom
tangyatsu/vnet-linux-systemd-dbus-polkit-files
Mar 17, 2026
Merged

Add Linux VNet systemd, dbus, polkit files to the teleport-connect package#64362
tangyatsu merged 1 commit intomasterfrom
tangyatsu/vnet-linux-systemd-dbus-polkit-files

Conversation

@tangyatsu
Copy link
Copy Markdown
Contributor

@tangyatsu tangyatsu commented Mar 6, 2026

What

This PR adds files that are required for Linux VNet from the previous PR #63664. These files will be shipped in the teleport-connect package.

changelog: Add VNet support for Teleport Connect on Linux

Installed files:

/usr/share/polkit-1/actions/org.teleport.vnet1.policy
/usr/share/dbus-1/system.d/org.teleport.vnet1.conf
/usr/share/dbus-1/system-services/org.teleport.vnet1.service
/usr/lib/systemd/system/teleport-vnet.service

Manual Test Plan

Test Environment

any Linux distro with systemd, D-Bus and polkit

Test Cases

  • Build and install teleport-connect package
  • Verify VNet files are installed in expected paths
  • Verify VNet can be started from Teleport Connect UI.
  • Remove teleport-connect, verify VNet files are removed.

@tangyatsu tangyatsu requested review from ravicious and sclevine March 6, 2026 13:36
@tangyatsu tangyatsu force-pushed the tangyatsu/vnet-linux-systemd-dbus-polkit-files branch from ea6fff4 to 44e49c9 Compare March 6, 2026 13:39
@tangyatsu tangyatsu marked this pull request as ready for review March 6, 2026 13:39
@github-actions github-actions bot requested review from aadc-dev and charlestp March 6, 2026 13:40
@tangyatsu tangyatsu mentioned this pull request Mar 6, 2026
8 tasks
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.

@tangyatsu @nklaassen I think we should make a decision on whether VNet is going to be available in plain tsh or not.

I'd argue that the teleport Linux package is used mostly to install agents and clusters. From this perspective, isn't setting up systemd files needed just for VNet both unnecessary and potentially a new attack vector? My whole argument hinges on this so let me know if this isn't correct. But I feel like setting up a new daemon that can affect how DNS works on a machine that's never supposed to run Teleport clients in the first place is both unnecessary and insecure.

We could tell tsh Linux users that if they want to use VNet, they need to install the teleport-connect package too. I suspect it might be fine for desktop users, but it would be potentially frowned upon when someone wants to use VNet without an available desktop env – would that be a valid complaint? The teleport-connect package depends on libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libsecret-1-0.

An alternative would be to embed those systemd files within the tsh binary and make tsh vnet set them up if they don't exist on the system. Or we could say that VNet on Linux is just not available without using Connect too.

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.

If you run tsh vnet with sudo, it checks for the presence of a VNet D-Bus daemon. If the daemon is not available, it spawns the admin process directly, so there is a way to run VNet without those systemd files, but the system still needs to have systemd and D-Bus available.

I agree that bundling systemd units into a package whose primary purpose is installing agents and clusters does look unnecessary, but I would prefer to leave the user the option to run VNet without sudo or requiring teleport connect to be installed.

Maybe we could add docs stating something like: “To run VNet as a systemd service, install these files.” then link to the directory in the teleport repo that contains the unit files.

tsh could also return an error that links to that documentation (links tend to break over time though and there are two of them)

Copy link
Copy Markdown
Member

@ravicious ravicious Mar 11, 2026

Choose a reason for hiding this comment

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

Maybe we could add docs stating something like: “To run VNet as a systemd service, install these files.” then link to the directory in the teleport repo that contains the unit files.

I think something like this would be a good solution for now. We don't really advertise tsh vnet anywhere other than in a small section of the docs.

The way I look at it, we wouldn't even need to add anything to the docs. We could make it so that when tsh vnet on Linux detects that the daemon is not present, it outputs a relevant message to stdout. Something like:

No D-Bus daemon detected. To run VNet without a password prompt, install these systemd files:

and what would follow is a link to https://github.com/gravitational/teleport/tree/v<version>/examples/systemd/vnet/. That dir would just need a readme.md added to explain how to install those files, as it might not be clear to everyone.


A more user-friendly approach would be to make tsh vnet install those files by itself as I mentioned in my comment. We could use the embed package to ship those files within the tsh binary itself.

However, as I mentioned, we don't really advertise tsh vnet that much, so I think that running with sudo and leaving a link to the systemd files would be perfectly fine for now.

@tangyatsu tangyatsu requested a review from ravicious March 10, 2026 21:09
Copy link
Copy Markdown
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

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

Sorry, forgot to submit this comment yesterday.

Comment thread examples/systemd/vnet/teleport-vnet.service Outdated
@ravicious ravicious self-requested a review March 12, 2026 11:43
@tangyatsu tangyatsu force-pushed the tangyatsu/vnet-linux-systemd-dbus-polkit-files branch 2 times, most recently from 09e8a5c to ed5d2aa Compare March 12, 2026 13:10
@tangyatsu tangyatsu requested a review from nklaassen March 12, 2026 13:11
@tangyatsu tangyatsu force-pushed the tangyatsu/vnet-linux-systemd-dbus-polkit-files branch from ed5d2aa to d39c94e Compare March 12, 2026 13:36
Comment thread web/packages/teleterm/electron-builder-config.js Outdated
@tangyatsu tangyatsu changed the title Add Linux VNet systemd, dbus, polkit files to teleport and teleport-connect packages Add Linux VNet systemd, dbus, polkit files to the teleport-connect package Mar 13, 2026
@tangyatsu tangyatsu force-pushed the tangyatsu/vnet-linux-systemd-dbus-polkit-files branch from d39c94e to 4e5b0ab Compare March 13, 2026 15:18
@tangyatsu tangyatsu added no-changelog Indicates that a PR does not require a changelog entry and removed no-changelog Indicates that a PR does not require a changelog entry labels Mar 13, 2026
@tangyatsu tangyatsu added this pull request to the merge queue Mar 17, 2026
Merged via the queue into master with commit 7423b4b Mar 17, 2026
51 of 54 checks passed
@tangyatsu tangyatsu deleted the tangyatsu/vnet-linux-systemd-dbus-polkit-files branch March 17, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants