Skip to content

Option to force a static UDP source port number #6

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

Closed
crawshaw opened this issue Feb 10, 2020 · 10 comments
Closed

Option to force a static UDP source port number #6

crawshaw opened this issue Feb 10, 2020 · 10 comments
Assignees
Labels
connectivity Issues with general connectivity with Tailscale enhancement New feature or request L4 Most users Likelihood P3 Can't get started Priority level T6 Major usability Issue type

Comments

@crawshaw
Copy link
Contributor

crawshaw commented Feb 10, 2020

Some firewalls only allow UDP to pass if it is from a known port. We should have a way for clients to be configured to use a predictable port.

It's not clear yet whether this is a network-wide setting, or a client setting.

@bradfitz bradfitz added connectivity Issues with general connectivity with Tailscale enhancement New feature or request labels Feb 10, 2020
@bradfitz
Copy link
Member

We already have this, at least on tailscaled.

Or are you talking about the iOS app? But in that case, the answer would be DERP.

What remains here, @crawshaw?

@crawshaw
Copy link
Contributor Author

tailscaled lets people use a fixed UDP port on linux. There is no equivalent option on macOS.

@apenwarr apenwarr added $support L3 Some users Likelihood P3 Can't get started Priority level T6 Major usability Issue type L4 Most users Likelihood and removed L3 Some users Likelihood labels Apr 22, 2020
@apenwarr
Copy link
Member

Note that this option really should be enabled by default, so that we can document the behaviour more easily. Perhaps unlike regular WireGuard, tailscale users generally are not interested in hiding their encrypted traffic from their corporate IT department; quite the opposite.

@apenwarr apenwarr changed the title Option to fix a UDP source port number Option to force a static UDP source port number Apr 28, 2020
@Oujiii
Copy link

Oujiii commented May 14, 2021

What is the flag to force a specific UDP port to be used on linux? I have a need for this as I can't use the default port on one of my servers, but I have a set of other ports I can use.

@apenwarr
Copy link
Member

apenwarr commented May 14, 2021 via email

@hronro
Copy link

hronro commented Feb 9, 2022

@apenwarr Can I force a specific UDP port on mac or windows please?

@Notfast
Copy link

Notfast commented Apr 9, 2022

I'm waiting for this option

@icepigeon-dev
Copy link

icepigeon-dev commented May 18, 2022

Please consider adding this option to other platforms (e.g. Windows, macOS and Synology)

--Edit--
Found the method to change the port on Synology.

/var/packages/Tailscale/scripts/start-stop-status in line 15,
/var/packages/Tailscale/target/conf/Tailscale.sc in lines 5-6

change the port to any other port.

@yabostone
Copy link

yabostone commented Jun 19, 2022

As you can change /etc/default/tailscaled option values, if you use linux.

# Set the port to listen on for incoming VPN packets.
# Remote nodes will automatically be informed about the new port number,
# but you might want to configure this in order to set external firewall
# settings.
PORT="42006"

# Extra flags you might want to pass to tailscaled.
FLAGS=""

In this config files, I changed Port value from 41641 to 42006 cause ISP blocked default port。

route configuration

if cat a public ip in your router,and you can add port forwarding,port forwarding from wan port 42006 to lan ip port 42006.(keep the port same,in this section ,changed port is 42006, you need to configure router port exposed the same-42006.)
Tailscale will generate default port mapping to test this link is up and can be directed.
if not , nat mapping will use "The benefits of birthdays" algorithm...

@haris2887
Copy link

haris2887 commented Feb 25, 2025

This does not work on the Tailscale docker .
Looks Like this option was removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
connectivity Issues with general connectivity with Tailscale enhancement New feature or request L4 Most users Likelihood P3 Can't get started Priority level T6 Major usability Issue type
Projects
None yet
Development

No branches or pull requests

9 participants