<div dir="ltr">Well, are you asking about the *source* port or about the *destination* port? There are two on every UDP packet.<div><div><br></div><div>The source port is *not* from the privileged range -- systemd-timesyncd always just lets the OS choose a random port from the ephemeral range. (I have seen some other NTP clients such as Windows insist on using 123 as both source and destination, but that's not the case with systemd-timesyncd nor with most other SNTP clients.)</div><div><br></div><div>The destination port has to be from the privileged range (specifically 123) because that's what NTP servers *listen on* -- the client cannot decide on a different port entirely on its own; you'd need to run your own NTP server configured to use a different port.</div><div><br></div><div>Although if you already have an NTP server listening on a different port, then unfortunately no, systemd-timesyncd does not currently have a config option for that. It seems port 123 is hardcoded in manager_connect(), most likely because that's what every public NTP server uses.</div><div><div></div><div><br></div><div>(Really I can't really think of any good purpose for such a block -- if anything, I'd expect to see the opposite, i.e. services on low ports allowed, the rest blocked. Does your network block DNS on port 53, too?)</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 11, 2020 at 6:34 PM Jędrzej Dudkiewicz <<a href="mailto:jedrzej.dudkiewicz@gmail.com">jedrzej.dudkiewicz@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I have quite a few devices running Linux in client's network - so I<br>
have no control over it. It seems that all privileged UDP ports are<br>
blocked I have to use unprivileged port. I'd like to use<br>
systemd-timesyncd to synchronize time, thought I can't find a way to<br>
force it to use unprivileged port. Is there any way to do it?<br>
<br>
Thanks in advance,<br>
-- <br>
Jędrzej Dudkiewicz<br>
<br>
I really hate this damn machine, I wish that they would sell it.<br>
It never does just what I want, but only what I tell it.<br>
_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org" target="_blank">systemd-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div>