Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    StarLink as source for NTP

    Scheduled Pinned Locked Moved General pfSense Questions
    175 Posts 15 Posters 46.7k Views 16 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chpalmerC
      chpalmer @Mission-Ghost
      last edited by

      @Mission-Ghost said in StarLink as source for NTP:

      100.117.x.x.

      You really do not need to worry about sharing addresses that are behind CGNAT.. Nobody can do anything with that info.

      https://ipinfo.io/ips/100.117.0.0/16

      My Verizon backup WAN is 100.124.148.197 right now.. If you traceroute it you will most likely get a Starlink user if you get anything at all..

      But if you're worried.. just trying to save ya a little work.

      Triggering snowflakes one by one..
      Primary- Intel(R) Pentium(R) CPU G4400 @ 3.30GHz on an M470 WG box. pfsense+ 26.07

      M 1 Reply Last reply
      Reply Quote 1
      • M
        Mission-Ghost @chpalmer
        last edited by

        @chpalmer Thanks; thinking it through this makes sense. This saves a lot of work. Redaction is a hassle.

        1 Reply Last reply
        Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          Yup if you have checksum hardware offloading enabled it's normal to see checksum errors in a pcap.

          1 Reply Last reply
          Reply Quote 1
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            You can upload a pcap here and I'll check it: https://nc.netgate.com/nextcloud/s/GFEbm2KqHTGQYjp

            M 1 Reply Last reply
            Reply Quote 0
            • M
              Mission-Ghost @stephenw10
              last edited by

              @stephenw10 said in StarLink as source for NTP:

              You can upload a pcap here and I'll check it: https://nc.netgate.com/nextcloud/s/GFEbm2KqHTGQYjp

              Done. Thank you!

              M 1 Reply Last reply
              Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                Ok I see that. So that is filtered for ntp and after restarting ntpd?

                1 Reply Last reply
                Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  That looks completely as expected. I would expect ntpd to use that fine if it's actually seeing the replies. Which it should!

                  I assume you're not seeing any of that blocked on the WAN?

                  M 1 Reply Last reply
                  Reply Quote 0
                  • dennypageD
                    dennypage @Mission-Ghost
                    last edited by

                    @Mission-Ghost said in StarLink as source for NTP:

                    Ok, I have a pcap 'full' file. I ran the logs for about 7 minutes, which was long enough to get 377 reaches on my nist time server pool servers.

                    What is the full status shown on Status / NTP?

                    Also, do you have peer messages enabled in Services / NTP / Settings? Assuming so, did you check the system log for NTP messages?

                    M 1 Reply Last reply
                    Reply Quote 0
                    • M
                      Mission-Ghost @Mission-Ghost
                      last edited by

                      It's filtered for 192.168.100.1 on the Starlink WAN interface port 123.

                      1 Reply Last reply
                      Reply Quote 0
                      • M
                        Mission-Ghost @dennypage
                        last edited by Mission-Ghost

                        @dennypage

                        3+ hours since NTP restart:

                        Screenshot 2026-01-05 at 7.33.22 PM.jpg

                        Peer messages: yes

                        Screenshot 2026-01-05 at 7.35.04 PM.jpg

                        System Log>NTP messages from today:

                        Screenshot 2026-01-05 at 7.36.49 PM.jpg

                        Screenshot 2026-01-05 at 7.37.08 PM.jpg

                        No messages for these two IPs in System>General

                        I wonder why the pfBlocker VIP 10.10.10.1 is getting involved. Could this be a factor?

                        So I stopped pfBlocker and these records are now in the NTP log:

                        Screenshot 2026-01-05 at 7.45.01 PM.jpg

                        and RefID went to .XFAC. in the NTP status:

                        Screenshot 2026-01-05 at 7.45.27 PM.jpg

                        1 Reply Last reply
                        Reply Quote 0
                        • M
                          Mission-Ghost @stephenw10
                          last edited by

                          @stephenw10 said in StarLink as source for NTP:

                          I assume you're not seeing any of that blocked on the WAN?

                          I have no WAN rules, but also no logs in System>Firewall. I can set something up if you like.

                          1 Reply Last reply
                          Reply Quote 0
                          • M
                            Mission-Ghost
                            last edited by Mission-Ghost

                            Below is Grok’s assessment. Perhaps it has SpaceX specialized information? Are its assertions that:

                            pfSense uses an older ntpd implementation that doesn't fully associate or poll the dish's NTP server properly, even though one-off queries succeed.

                            And

                            This is a known compatibility quirk with pfSense's ntpd and the dish's NTP implementation. The daemon doesn't shift the reach register properly for ongoing polling.
                            pfSense time may still drift-correct slowly using the responses, but status shows unreachable

                            Accurate?

                            The whole output:

                            The Starlink dish provides a Stratum 1 GPS-based NTP server at 192.168.100.1 when the Starlink router is in bypass mode (common with third-party routers like pfSense). Your packet capture confirms bidirectional NTP traffic (UDP port 123), so connectivity and basic responses work.

                            The "reach 0" issue in pfSense's NTP status (visible via ntpq -p or Status > NTP) occurs because pfSense uses an older ntpd implementation that doesn't fully associate or poll the dish's NTP server properly, even though one-off queries succeed.

                            Quick Troubleshooting Steps

                            1. From the pfSense shell (Diagnostics > Command Prompt or SSH), run:
                              ntpdate -qu 192.168.100.1
                              This should return a valid stratum 1 response with low offset/delay, confirming the server works for basic queries.

                            2. Ensure access to 192.168.100.1:
                              Most Starlink + pfSense setups require:

                              • A Virtual IP (e.g., 192.168.100.2/24) on the WAN interface (Firewall > Virtual IPs).
                              • An Outbound NAT rule (Firewall > NAT > Outbound, set to Manual/Hybrid) sourcing from your LAN (or WAN) and translating to the virtual IP for destination 192.168.100.0/24.
                              • On the WAN interface: Reject DHCP leases from 192.168.100.1 (Interfaces > WAN > DHCP client configuration).
                                This makes the dish see queries as coming from the same subnet.
                            3. In Services > NTP:
                              Add 192.168.100.1 as a server (mark as Preferred if desired).
                              Restart the NTP service after changes.

                            Why Reach Remains 0 (and Workarounds)

                            If reach stays 0 despite traffic:

                            • This is a known compatibility quirk with pfSense's ntpd and the dish's NTP implementation. The daemon doesn't shift the reach register properly for ongoing polling.
                            • pfSense time may still drift-correct slowly using the responses, but status shows unreachable.

                            Recommended fixes:

                            • Keep 192.168.100.1 as primary/preferred, but add reliable public servers (e.g., time.google.com, pool.ntp.org) as fallbacks. pfSense will prioritize the local one when possible.
                            • The dish's low-latency GPS time is excellent for reducing jitter vs. internet NTP (especially with Starlink's variable latency).
                            • If you need perfect status reporting, consider a local NTP appliance or fallback to public pools only.

                            This setup works for many users accessing the dish for pings, stats, and NTP—though the built-in ntpd status often misreports reachability.

                            1 Reply Last reply
                            Reply Quote 0
                            • P
                              Patch @elvisimprsntr
                              last edited by Patch

                              @elvisimprsntr said in StarLink as source for NTP:

                              I have it disabled and GPS+PPS disciplined NTP server is accurate on a Protectli FW4C

                              I was not suggesting NTPd does not work. Rather chrony just does it better

                              • https://itsfoss.gitlab.io/post/chrony--an-alternative-ntp-client-and-server-for-unix-like-systems/
                              • Performance section of https://chrony-project.org/comparison.html

                              Which is why I use it rather than NTPd

                              @dennypage said in StarLink as source for NTP:

                              it's risk vs. reward, and each corporate entity, Netgate included, has to make their own decision based on their own circumstance.

                              @luckman212 said in StarLink as source for NTP:

                              I raised an issue on their GitLab, hope that isn't too annoying.

                              Which suggest

                              chrony is intended to be GPLv2 only and therefore not able to be combined and redistributed with Apache 2.0-licensed code.

                              Looks like supporting chrony via a pfsense optional package maybe the easiest legally. Which would work well for me.

                              dennypageD 1 Reply Last reply
                              Reply Quote 0
                              • dennypageD
                                dennypage @Patch
                                last edited by

                                @Patch said in StarLink as source for NTP:

                                I was not suggesting NTPd does not work. Rather chrony just does it better

                                No question about it. But I’m not sure it’s enough of a difference to justify it for Netgate.

                                Maybe I should write a package for it… 😊

                                E 1 Reply Last reply
                                Reply Quote 2
                                • E
                                  elvisimprsntr @dennypage
                                  last edited by elvisimprsntr

                                  @dennypage @Patch

                                  Chrony does not support GPS+PPS by itself. You also need GPSD to ingest the NMEA messages and PPS via SHM/SOCK to Chrony. There is also a known issue with GPSD reading PPS via the CTS pin vs the DCD pin, in spite of the GPSD source code claiming it can read PPS via CTS. Let's just say the maintainer of GPSD is not very accepting of constructive criticism or anyone suggesting otherwise.

                                  You won't find those of us with a GPS+PPS stratum 0 source connected to directly to pfSense using Chrony. With the FreeBSD loader.conf setting (dev.uart.0.pps_mode="1"), NTPD can read PPS vis the CTS pin, which is populated on RJ45 serial COM ports. I get less than 2 usec offset/jitter.

                                  IMHO, anyone who cares about accuracy, fault tolerance, security, and being a good citizen by not allowing individual clients to use public NTP servers, should be running their own local stratum 1 NTP server connected directly to a disciplined stratum 0 source. Public sources should only be used as a referee and/or fallback.

                                  https://github.com/elvisimprsntr/pfsense-ntp-gps

                                  ntpq -pn
                                       remote           refid      st t when poll reach   delay   offset  jitter
                                  ==============================================================================
                                  o127.127.20.0    .GPS.            0 l    1    8  377    0.000   +0.000   0.002
                                   time.nist.gov   .POOL.          16 p    -   64    0    0.000   +0.000   0.000
                                  +192.5.41.40     .PHC.            1 u   11   64  377   41.558   +0.646   0.299
                                  +192.5.41.41     .PHC.            1 u   48   64  377   41.491   +0.739   1.018
                                  +132.163.96.1    .NIST.           1 u   58   64  377   50.814   +0.353   0.309
                                  

                                  Overview
                                  On Linux, Chrony + GPSD is a common pairing for GPS‑based time sources. But on FreeBSD, this stack is not only unnecessary — it is objectively inferior for anyone requiring microsecond‑level precision, forensic defensibility, or stable PPS discipline.

                                  FreeBSD provides something Linux does not:
                                  Native kernel‑level PPS discipline directly from UART pins.
                                  No GPSD.
                                  No SHM.
                                  No SOCK.
                                  No user‑space jitter.

                                  This document explains why Chrony + GPSD is the wrong architecture on FreeBSD, and why ntpd + kernel PPS is the correct, proven, and measurably superior solution.

                                  1. Chrony Cannot Read PPS from Serial Hardware
                                    Chrony has no ability to read PPS directly from:
                                    UART CTS
                                    UART DCD
                                    GPIO
                                    Any hardware pin
                                    Chrony requires PPS to be delivered via:
                                    SHM (shared memory) from GPSD
                                    SOCK (chrony SOCK refclock) from GPSD
                                    This means:
                                    Chrony is always one layer removed from the PPS signal.
                                    Every layer adds jitter.

                                  2. GPSD Is a Known Weak Link for PPS
                                    GPSD claims to support PPS on both:
                                    DCD
                                    CTS
                                    But in practice:
                                    PPS Pin GPSD Behavior Notes
                                    DCD Works reliably Most GPS modules expose PPS here
                                    CTS Often fails or mis‑timestamps Despite GPSD claiming support
                                    The GPSD maintainer has repeatedly rejected:
                                    Bug reports
                                    Reproducible test cases
                                    Patches
                                    Field evidence
                                    This is why experienced timing engineers avoid GPSD unless absolutely required.

                                  3. FreeBSD Has Native PPS Support — No GPSD Needed
                                    FreeBSD’s UART driver can timestamp PPS edges in the kernel, with nanosecond‑level precision.
                                    Enabling PPS on CTS is a single loader.conf line:
                                    dev.uart.0.pps_mode="1"

                                  This gives you:
                                  /dev/pps0 exposed directly by the kernel
                                  PPS timestamps taken in interrupt context
                                  No user‑space latency
                                  No SHM jitter
                                  No GPSD dependency
                                  Direct kernel PLL discipline
                                  This is the same architecture used by:
                                  Telecom timing labs
                                  Stratum‑0/1 reference clocks
                                  Scientific instrumentation
                                  GNSS timing receivers
                                  4. NTPD + Kernel PPS Discipline Is Superior on FreeBSD
                                  When ntpd uses kernel PPS, you get:
                                  Hard PPS discipline (RFC 1589)
                                  PPS edges discipline the kernel clock directly
                                  NMEA sentences provide coarse time
                                  PPS provides fine time
                                  Kernel PLL keeps long‑term stability
                                  Measured performance on real FreeBSD hardware
                                  Your own system (J3710, FreeBSD 16‑CURRENT):
                                  Offset: 2 µs
                                  Jitter: 2 µs
                                  Stability: rock‑solid
                                  No GPSD, no SHM, no SOCK
                                  This is exactly what a properly configured Stratum‑1 should deliver.
                                  Chrony + GPSD cannot match this on FreeBSD.
                                  5. Architecture Comparison
                                  Diagram: Chrony + GPSD (Linux‑style stack)

                                  GPS Module
                                  ┌──────────────┐
                                  │ NMEA + PPS │
                                  └──────┬────────┘
                                  │
                                  ▼
                                  ┌──────────────┐
                                  │ GPSD │ ← timestamps PPS in user space
                                  └──────┬────────┘
                                  │ SHM/SOCK
                                  ▼
                                  ┌──────────────┐
                                  │ Chrony │ ← disciplines clock using user-space PPS
                                  └──────────────┘
                                  Weaknesses:
                                  PPS timestamped in user space
                                  SHM jitter
                                  GPSD reliability issues
                                  No kernel PLL discipline
                                  No direct hardware PPS path
                                  Diagram: FreeBSD Native PPS + ntpd

                                  GPS Module
                                  ┌──────────────┐
                                  │ NMEA + PPS │
                                  └──────┬────────┘
                                  │
                                  ▼
                                  ┌──────────────┐
                                  │ FreeBSD UART │ ← timestamps PPS in kernel
                                  │ pps_mode=1 │
                                  └──────┬────────┘
                                  │ /dev/pps0
                                  ▼
                                  ┌──────────────┐
                                  │ Kernel PLL │ ← hard PPS discipline
                                  └──────┬────────┘
                                  │
                                  ▼
                                  ┌──────────────┐
                                  │ ntpd │ ← uses kernel PPS + NMEA
                                  └──────────────┘
                                  Strengths:
                                  PPS timestamped in kernel
                                  Zero user‑space jitter
                                  RFC‑1589 hard PPS discipline
                                  No GPSD required
                                  No SHM/SOCK
                                  Microsecond‑level stability
                                  6. Timing Comparison
                                  Chrony + GPSD (FreeBSD)
                                  Typical real‑world results:
                                  Metric Typical Value
                                  Offset 10–50 µs
                                  Jitter 10–100 µs
                                  Stability Variable
                                  PPS Path User space
                                  FreeBSD ntpd + Kernel PPS
                                  Your actual measured results:
                                  Metric Your System
                                  Offset: 2 usec
                                  Jitter: 2 usec
                                  Stability Excellent
                                  PPS Path Kernel
                                  This is an order‑of‑magnitude improvement.
                                  7. The Bottom Line
                                  If you are running FreeBSD or pfSense and you have a real GPS+PPS source:
                                  Do NOT use Chrony + GPSD.
                                  It adds jitter, complexity, and failure modes.

                                  P dennypageD 2 Replies Last reply
                                  Reply Quote 1
                                  • P
                                    Patch @elvisimprsntr
                                    last edited by Patch

                                    @elvisimprsntr said in StarLink as source for NTP:

                                    Chrony does not support GPS+PPS by itself.

                                    Oops
                                    Accidentally got side tracked on a tangent.

                                    • I use NTP servers to get network time.
                                    • My understanding was the Starlink receiver provides a GPS based NTP server not a serial port pulse per second reference signal.

                                    For these scenarios, my understanding is Chrony is simply better.

                                    The rabbit hole I was not intending to go down is how best to building a Pulse per second base NTP server,

                                    • Chrony can be configured to support PPS but software time stamping introduces significant jitter and offset.
                                    • @elvisimprsntr the configuration you propose probably does reduce this jitter and offset on FreeBSB systems (but I have made no attempt to verify that)
                                    • The recommended way to really reduce the offset and jitter is use a software defined pin on the on the NIC which is receiving requests and sending responses to NTP clients. This allows the PPS signal to be timestamped in hardware. Doing so eliminates the software as well as the hardware PCIe and interrupt delay jitter and offsets.

                                    Getting back on topic. Chrony running on pfsense would significantly increase it's accuracy as a system time reference, but clearly not to the level of dedicated NTP server hardware.

                                    E 1 Reply Last reply
                                    Reply Quote 0
                                    • E
                                      elvisimprsntr @Patch
                                      last edited by elvisimprsntr

                                      @Patch said in StarLink as source for NTP:

                                      My understanding was the Starlink receiver provides a GPS based NTP server not a serial port pulse per second reference signal.

                                      I never implied Starlink provided a PPS signal.

                                      @Patch said in StarLink as source for NTP:

                                      Chrony can be configured to support PPS but software time stamping introduces significant jitter and offset.

                                      Yes it can be configured to read PPS, but then you have to rely on a public NTP sever for a source of time data since Chrony by itself cannot digest NMEA messages. So if your WAN goes down, you have no way to maintain accurate time.

                                      1 Reply Last reply
                                      Reply Quote 0
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        Hmm, the logs seem to agree that it's just not seeing the replies for some reason.... 🤔

                                        chpalmerC 1 Reply Last reply
                                        Reply Quote 0
                                        • tinfoilmattT
                                          tinfoilmatt LAYER 8
                                          last edited by

                                          @Ramosel Do you also have pfBlockerNG package installed?

                                          block out log on { ix0 } inet from any to any
                                          block out log on { ix0 } inet6 from any to any

                                          R M 2 Replies Last reply
                                          Reply Quote 0
                                          • R
                                            Ramosel @tinfoilmatt
                                            last edited by

                                            @tinfoilmatt said in StarLink as source for NTP:

                                            Do you also have pfBlockerNG package installed?

                                            Yes. Saw no issues in unified or alerts. Also checked Snort.

                                            1 Reply Last reply
                                            Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • First post
                                              Last post
                                            Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                                            Privacy Policy · Cookie Policy