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

Make telepresence discover that DNS IP is in conflict with a proxied subnet #2429

Open
thallgren opened this issue Feb 22, 2022 · 3 comments
Labels
feature New feature or enhancement request

Comments

@thallgren
Copy link
Member

Background

Users are experiencing loss of network after they do telepresence connect. This will happen if the DNS is configured to use a server IP that is mapped by a subnet in Telepresence's TUN-device.

A common scenario is an ec2 instance that uses a DNS server at 172.31.0.2 (common default nameserver). Typical output from resolvectl dns:

$ resolvectl dns
Global:
Link 2 (ens5): 172.31.0.2

When Telepresence connects to an EKS cluster, the cluster uses a pod-subnet with an overlapping IP. The log shows:

<timestamp> info    daemon/watch-cluster-info : Adding pod subnet 172.31.0.0/18

While connected, all requests to 172.31.0.2 will be routed to the cluster and the cluster doesn't have a DNS server at that IP. All requests for names covered by the exclude-suffix list will then fail (the ones not covered will be routed to the cluster's proper DNS and likely succeed).

Workaround

Adding the local DNS IP to the never-proxy as 172.31.0.2/32 solves the problem. The DNS queries will no longer be routed to the cluster and instead proceed to their original network destination.

Desired improvement

Telepresence should detect this situation and automatically add the conflicting entry to the never-proxy list.

Alternative

The telepresence test-vpn could detect this conflict and suggest the aforementioned workaround.

@bhavitsharma
Copy link

Thanks @thallgren for filing this. One more ask: Please default route entries for the VPN gateway. My SSH finally worked after this :)
More context in this issue.

@bhavitsharma
Copy link

and thanks again for very prompt responses and finding the solution!

@thallgren
Copy link
Member Author

@bhavitsharma you're more than welcome. Your input was very helpful in finding the root cause. And now you've also verified that the workaround indeed solves your problem. Thanks!

@cindymullins-dw cindymullins-dw added the feature New feature or enhancement request label Dec 17, 2022
@github-actions github-actions bot added the stale Issue is stale and will be closed label Aug 16, 2024
@thallgren thallgren removed the stale Issue is stale and will be closed label Aug 25, 2024
@telepresenceio telepresenceio deleted a comment from github-actions bot Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or enhancement request
Projects
None yet
Development

No branches or pull requests

3 participants