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

Tailscale fails to detect/use Eero's UPnP #3197

Closed
danderson opened this issue Oct 27, 2021 · 9 comments · Fixed by #3199
Closed

Tailscale fails to detect/use Eero's UPnP #3197

danderson opened this issue Oct 27, 2021 · 9 comments · Fixed by #3199
Labels
bug Bug needs-triage portmap Pertaining to NAT-PMP, PCP, UPnP

Comments

@danderson
Copy link
Member

What is the issue?

My network uses an Eero gateway, which supports UPnP. tailscale netcheck and node hostinfo both report that no portmapping protocols are available on my LAN.

Steps to reproduce

Get an eero network, turn on UPnP in network settings, use tailscale.

Are there any recent changes that introduced the issue?

No response

OS

Linux, macOS, Windows, Android

OS version

No response

Tailscale version

No response

Bug report

BUG-7f282f26c77f1efeb8d494a99187c1d55a4346b814e69cd004df6dda231794b1-20211027204508Z-4920474da648f13d

@DentonGentry
Copy link
Contributor

Does tailscale netcheck --verbose show anything interesting?

@danderson
Copy link
Member Author

Nothing useful, just STUN spam to DERP servers. The only portmap-related log is netcheck: portMap done.

@danderson
Copy link
Member Author

tailscaled debug --portmap says:

2021/10/27 13:55:47 gw=192.168.4.1; self=192.168.4.32
2021/10/27 13:55:48 Probe: {PCP:false PMP:false UPnP:false}
2021/10/27 13:55:48 no portmapping services available

@danderson
Copy link
Member Author

danderson commented Oct 27, 2021

nmap on my eero router shows that tcp/1900 is open, so UPnP is present. My guess is that eero's implementation doesn't response to the HTTP discovery query if it's directed at its unicast address, instead responding only to a correct multicast query - which we don't do.

@danderson
Copy link
Member Author

Interesting: miniupnpc also cannot find the UPnP service on the eero.

@danderson
Copy link
Member Author

tcpdump says the eero is correctly responding to miniupnpc's multicast discovery queries, albeit apparently not with something that pleases miniupnpc. Tailscale's probes elicit no response from eero, which seems to confirm that it will only respond to correct multicast queries per the spec, not the spec-bending violation we've been doing.

@danderson
Copy link
Member Author

upnpc makes both a unicast request to the gateway, and a multicast request. The unicast request is identical to the one Tailscale makes, and is ignored. The multicast request is differently formed (asking only UPnP IGD devices to respond), and elicits a lot of response from the eero. Digging into diff now, and why the response still doesn't please upnpc.

@danderson
Copy link
Member Author

TL;DR: eero is implementing UPnP correctly, but declines to implement some optional behavior, and we rely on that optional behavior to correctly detect UPnP.

Sent https://www.reddit.com/r/eero/comments/qh6xiq/feature_request_respond_to_upnp_ssdp_queries_on/ into the void to see if they might fix it, but in the meantime, the fix on our end would be to follow the UPnP spec and direct our UPnP probes at the SSDP multicast address.

@danderson
Copy link
Member Author

woot, found a 2-line fix that might do the trick.

danderson added a commit that referenced this issue Oct 27, 2021
Fixes #3197

Signed-off-by: David Anderson <danderson@tailscale.com>
danderson added a commit that referenced this issue Oct 27, 2021
Fixes #3197

Signed-off-by: David Anderson <danderson@tailscale.com>
danderson added a commit that referenced this issue Oct 27, 2021
Now that we multicast the SSDP query, we can get IGD offers from
devices other than the current device's default gateway. We don't want
to accidentally bind ourselves to those.

Updates #3197

Signed-off-by: David Anderson <danderson@tailscale.com>
danderson added a commit that referenced this issue Oct 27, 2021
Now that we multicast the SSDP query, we can get IGD offers from
devices other than the current device's default gateway. We don't want
to accidentally bind ourselves to those.

Updates #3197

Signed-off-by: David Anderson <danderson@tailscale.com>
bradfitz pushed a commit that referenced this issue Oct 29, 2021
Fixes #3197

Signed-off-by: David Anderson <danderson@tailscale.com>
(cherry picked from commit 4a65b07)
bradfitz pushed a commit that referenced this issue Oct 29, 2021
Now that we multicast the SSDP query, we can get IGD offers from
devices other than the current device's default gateway. We don't want
to accidentally bind ourselves to those.

Updates #3197

Signed-off-by: David Anderson <danderson@tailscale.com>
(cherry picked from commit 060ba86)
@DentonGentry DentonGentry added the portmap Pertaining to NAT-PMP, PCP, UPnP label Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug needs-triage portmap Pertaining to NAT-PMP, PCP, UPnP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants