Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    NTP Status Broken?

    Scheduled Pinned Locked Moved General pfSense Questions
    16 Posts 3 Posters 1.7k Views
    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.
    • D
      dweimer @dweimer
      last edited by

      I am thinking its not an NTP configuration issue, its something else. I just tried doing a telnet to 127.0.0.1 using port 123. That would be on TCP instead of UDP but I get the same error can't write to requested address. So something on the system is blocking attempts to connect outbound from 127.0.0.1.

      [2.5.2-RELEASE][admin@pfSense.dweimer.me]/root: telnet 127.0.0.1 123
      Trying 127.0.0.1...
      telnet: connect to address 127.0.0.1: Can't assign requested address
      telnet: Unable to connect to remote host
      
      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator @dweimer
        last edited by johnpoz

        @dweimer said in NTP Status Broken?:

        restrict source kod limited nomodify notrap

        Off the top I don't know what "source" is in that statement?

        also I don't have this

        interface listen lo0

        And I can query on loopback just fine.. That is for the ntp come up as server on loopback.. Which is really kind of pointless ;)

        localhost.jpg

        Do you have vip or something setup there?

        [21.05.2-RELEASE][admin@sg4860.local.lan]/: ifconfig lo0
        lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
                options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
                inet6 ::1 prefixlen 128
                inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8
                inet 127.0.0.1 netmask 0xff000000
                groups: lo
                nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        [21.05.2-RELEASE][admin@sg4860.local.lan]/: 
        

        I don't have loopback selected, but still show 123 listen on loopback

        listen127.jpg

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        GertjanG 1 Reply Last reply Reply Quote 0
        • GertjanG
          Gertjan @johnpoz
          last edited by

          @johnpoz said in NTP Status Broken?:

          And I can query on loopback just fine.. That is for the ntp come up as server on loopback.. Which is really kind of pointless ;)

          A local 'pFsense' process could address 127.0.0.1:123 for some time info?!

          If you query loopback or localhost or 127.0.0.1 (:123) then a ntp server process should listen on that address:port.

          sockstat -4l | grep 'ntp'
          

          confirms it does so for me.

          We me, "udp4 *:123" overlaps even "udp4 127.0.0.1:123".

          root     ntpd       51142 21 udp4   *:123                 *:*
          .....
          root     ntpd       51142 32 udp4   127.0.0.1:123         *:*
          .....
          

          when I de select 'Localhost' I still see :

          root     ntpd       68960 21 udp4   192.168.10.3:123      *:*
          root     ntpd       68960 23 udp4   192.168.1.1:123       *:*
          root     ntpd       68960 26 udp4   192.168.2.1:123       *:*
          root     ntpd       68960 29 udp4   127.0.0.1:123         *:*
          root     ntpd       68960 31 udp4   192.168.3.1:123       *:*
          

          acb95ebf-a82f-41bb-86f9-e2907cdab2da-image.png

          Nice .... !?!

          Btw : IPv6 : the same thing : "udp6 ::1:123 :" stays in place.

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          D 1 Reply Last reply Reply Quote 0
          • D
            dweimer @Gertjan
            last edited by

            @johnpoz
            I removed the loopback interface from the listen on list, no change in behavior still shows its listening on 127.0.0.1:123 as well as ::1:123 but still can't connect. to 127.0.0.1 I did test, DNS is listening on 127.0.0.1:53 and I can't connect to it either.
            Something is preventing the system from binding to lo0 with IPv4 for querying itself.

            johnpozJ 1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator @dweimer
              last edited by johnpoz

              @dweimer yeah I don't know.. But I don't have that selected and I can query 127 for ntp..

              What would be doing a query on pfsense to ntp though? To set its time, ntp sets the system time, etc.

              But to validate that am actually connecting to 127.0.0.1 when do ntpq, I tried then an IP that clearly is not on pfsense or anywhere on my network.. and get permission denied error

              ntp.jpg

              Can you output the ipconfig for lo0

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

              D 1 Reply Last reply Reply Quote 0
              • D
                dweimer @johnpoz
                last edited by

                @johnpoz I simply want to look at the dashboard and quickly see that my NTP is in sync. Instead of it telling me that I have no peers and to check service.

                [2.5.2-RELEASE][admin@pfSense.dweimer.me]/: ifconfig lo0
                lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
                        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
                        inet6 ::1 prefixlen 128
                        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8
                        inet 127.0.0.1 netmask 0xff000000
                        groups: lo
                        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
                

                I would expect that ntpq couldn't connect to a nonexistent address, but it should bind to the adapter and attempt a query. the permission denied message above is different than the can't assign requested address I receive connecting to 127.0.0.1.

                johnpozJ 1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator @dweimer
                  last edited by johnpoz

                  @dweimer I was just wanting to show that it was actually taking in the IP put in and not connecting to something else.

                  edit: still curious to what this is and does
                  restrict source kod limited nomodify notrap

                  Off the top of my head source seems like a placeholder, but not sure what it is.. I sure do not have that.. Do your other instances that do work have that?

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    dweimer @johnpoz
                    last edited by

                    @johnpoz yes the other instances have that, I don't know what is putting it in there I do know if I manually remove it and restart the service it comes back.

                    johnpozJ 1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator @dweimer
                      last edited by

                      @dweimer do you have some local pps or gps or something that is suppose to be setting time? Under the Serial GPS or PPS tabs?

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                      D 1 Reply Last reply Reply Quote 0
                      • D
                        dweimer @johnpoz
                        last edited by

                        @johnpoz Nope, only configured to use external NTP servers, currently just set to 0.pfsense.pool.ntp.org.

                        D 1 Reply Last reply Reply Quote 0
                        • D
                          dweimer @dweimer
                          last edited by

                          Well, I somehow resolved it...
                          Sort of, I downloaded the configuration manually edited the XML file, removing the <ntpd>...</ntpd> section. Did a restore of full configuration, after the reboot it works, checked the NTP configuration, all looks the same. Even Debug output is all the same except now both IPv4 127.0.0.1 and IPv6 ::1 query through ntpq work.
                          Only thing I can figure is that there is a hidden or corrupted character in old ntp configuration section.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.