Bug 237999 - rc.d/ntpd cannot fetch NTPD leap-seconds file via a proxy
Summary: rc.d/ntpd cannot fetch NTPD leap-seconds file via a proxy
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.2-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2019-05-20 12:25 UTC by Boris Korzun
Modified: 2020-10-16 10:02 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Boris Korzun 2019-05-20 12:25:14 UTC
The ntpd script supports ntpd_env option (and ntpd_env_file in 12.0-STABLE). But ntpd_fetch_leapfile() subroutine doesn't support ntpd_env option.

So it's impossible to fetch the leapfile via a proxy (HTTP_PROXY variable for the fetch).
Comment 1 mail 2020-02-19 13:35:14 UTC
(In reply to Boris Korzun from comment #0)

Hi Boris,

Were you ever able to fix this "nicely"?

We have a couple of FreeBSD 12.1 hosts that rely on a proxy for their internet access. They suffer from this issue as well.

Kind regards,

Comment 2 Peter Pramberger 2020-10-16 08:59:50 UTC
The workaround mentioned in https://forums.freebsd.org/threads/set-proxy-server-for-rc-d-periodic-scripts.69664/post-418020 was a good starting point, but unfortunately I was not able to get 'ntpd_env' working.

There is however 'ntpd_env_file' (at least in 12) to source external files, which works perfectly:


export http_proxy

Just make sure that the referenced file is readable, and usable by sh(1).

Would prefer a more generic way though, instead of changing the environment for every service needing external access.
Comment 3 Peter Pramberger 2020-10-16 10:02:47 UTC
(In reply to Peter Pramberger from comment #2)

Sorry, I missed that 'ntpd_env_file' was already mentioned - for me it works that way.