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

Select resolver automatically: tart ip --resolver=auto #1010

Open
nirs opened this issue Jan 20, 2025 · 3 comments
Open

Select resolver automatically: tart ip --resolver=auto #1010

nirs opened this issue Jan 20, 2025 · 3 comments

Comments

@nirs
Copy link

nirs commented Jan 20, 2025

tart ip requires the user to select the right resolver, which makes the command harder to use. It can be easier it tart ip will pick the right resolver for the user based on the way the vm was run.

  • If the vm was run with --net-softnet: use dhcpd
  • If the vm was run with --net-bridged: use arp

The new mode can be named "auto"

If we don't have info on the way the vm was started tart ip can check all resolvers before it fails.

@nirs nirs changed the title Select resolver automatically: tart ip --resolvers=auto Select resolver automatically: tart ip --resolver=auto Jan 20, 2025
@edigaryev
Copy link
Collaborator

If we don't have info on the way the vm was started tart ip can check all resolvers before it fails.

That's not an option, unfortunately, because it's inherently insecure: tart ip could pick up an ARP entry injected from the local network, and this network may be untrusted.

As for a more explicit option, this requires some way of communication between the tart run and tart ip.

@nirs
Copy link
Author

nirs commented Jan 20, 2025

If we don't have info on the way the vm was started tart ip can check all resolvers before it fails.

That's not an option, unfortunately, because it's inherently insecure: tart ip could pick up an ARP entry injected from the local network, and this network may be untrusted.

Good point, but this also means that using arp resolver is inherently insecure.

@edigaryev
Copy link
Collaborator

Good point, but this also means that using arp resolver is inherently insecure.

Not really: using an ARP resolver can be secure if the Tart user considers their local network as secure, including any other directly attached networks, such as VPN.

But the point here is that it's up to the user to explicitly communicate this, and this is why tart ip doesn't magically switch between these two methods of IP resolution.

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

No branches or pull requests

2 participants