Bug #14676
open
Listening Port option in the Tailscale configurator is not respected
Added by David G over 1 year ago.
Updated 10 months ago.
Description
The tailscaled process starts and listens on a random port, instead of the one specified. This causes things like direct tunnels between tailscale node to not work (WAN rule), thus causing all traffic to be relayed when the other device is behind double NAT or other hard NAT types. If I go and see what port is actually being used and adjust me WAN rule, suddenly direct connections are all established.
How to reproduce:
1. Set a listening port
2. Start the tailscale service
3. View what the actual port is being listened on by executing "sockstat -l"
Files
Tested on 2.7.0 and 23.05.1 , Tailscale 0.1.4
Can not reproduce, if I change listen port it always changed appropriate the settings
I'm not able to replicate this report myself.
Christian McDonald wrote in #note-2:
I'm not able to replicate this report myself.
Here are some screenshots of the issue happening on my end. I will try to reinstall the package and see what happens.
David G wrote in #note-3:
Christian McDonald wrote in #note-2:
I'm not able to replicate this report myself.
Here are some screenshots of the issue happening on my end. I will try to reinstall the package and see what happens.
After reinstalling the package, the service started back up, however, now it's listening on different random ports.
I bet something else is already listening on 11111, forcing tailscaled to choose another port to bind.
- Status changed from New to Not a Bug
Christian McDonald wrote in #note-5:
I bet something else is already listening on 11111, forcing tailscaled to choose another port to bind.
I just tried another port, but also confirmed nothing is listening on it before setting it. I also completely killed the tailscaled process and started it back up. The next thing I tried was a log out and clean, but that also did not do anything. The port is still random. Anything else I can try?
David G wrote in #note-7:
Christian McDonald wrote in #note-5:
I bet something else is already listening on 11111, forcing tailscaled to choose another port to bind.
I just tried another port, but also confirmed nothing is listening on it before setting it. I also completely killed the tailscaled process and started it back up. The next thing I tried was a log out and clean, but that also did not do anything. The port is still random. Anything else I can try?
Alright, I found the issue. If I don't use a custom control server and use tailscales, the issue does not occur and the port setting is respected. As soon as I specify my own control server, the port is randomized. Please confirm if this is reproducible on your end.
- Status changed from Not a Bug to Confirmed
The same behaviour on
23.09.1-RELEASE (amd64)
built on Tue Jan 30 15:33:00 MST 2024
FreeBSD 14.0-CURRENT
If use custom server te listen ports are randomized
Also available in: Atom
PDF