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

    Authenicated NTP

    Scheduled Pinned Locked Moved General pfSense Questions
    78 Posts 11 Posters 15.4k 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.
    • M
      MatthewA1 @JonathanLee
      last edited by MatthewA1

      Ah I had been using Path Strip Count = 1 when I was testing. It probably makes more sense to just edit the patch file.
      Here they are corrected (it won't let me edit the previous post):
      system.inc.patch
      status_ntpd.php.patch
      services_ntpd.php.patch

      JonathanLeeJ 1 Reply Last reply Reply Quote 1
      • JonathanLeeJ
        JonathanLee @MatthewA1
        last edited by

        @MatthewA1 After so many posts in the forum you can edit old posts I think it has been a while for me.

        Make sure to upvote

        1 Reply Last reply Reply Quote 1
        • tinfoilmattT
          tinfoilmatt
          last edited by

          i was fully onboard until i realized access requires the requestor to furnish the following:

          • Name and postal street address of the organization or individual
          • Name and contact information for the system operator and an alternate name if possible. These should include the e-mail addresses and the preferred contact method.
          • Network IP address of the client system that will be used to query the NIST server. A network name is desirable but not required, since the system will authenticate the request using IP addresses only. Users may request up to 4 contiguous IP addresses that will share the same key.

          you can't claim tinfoil hat and then furnish a full government and USPS street address to the Feds!

          all seriousness though, these patches could easily be modified to configure a private authenticated NTP provider. good stuff, OP. i agree they should be added to base install.

          M JonathanLeeJ 2 Replies Last reply Reply Quote 0
          • M
            MatthewA1 @tinfoilmatt
            last edited by MatthewA1

            @cyberconsultants The patches are not specific to NIST's authenticated NTP service, as NIST just implements authentication per the NTP RFCs. In fact, I tested these with my own NTP server which sources time from GPS and provides authenticated NTP service. The difference is, if you control your own NTP server, you can get by with only using key ID 1 (currently hard coded in the pfSense source) whereas using NIST's (or likely anyone's) public service, you have to be able to set a different key ID.

            Side note: For anyone who doesn't want to go to the trouble of sending a letter or finding a fax machine, unlike what the NIST website says, they now do the key process all via email (and their file transfer site).

            1 Reply Last reply Reply Quote 0
            • JonathanLeeJ
              JonathanLee @tinfoilmatt
              last edited by JonathanLee

              @cyberconsultants I can tell you projects that seek to improve aging protocols (NTP) take time (no pun intended) and trusted testers. I personally had issues with NTP getting hacked and having 10-15 jumps durring college tests without use of authentication (checked with analog gear clocks). I have not had that issue once it was moved to NIST authenticated time. It's a great project that seeks to fix issues like this. So far I have not had issues with use of these services. Again I was taking cyber security tests so I would expect the class wanted to drip students toes into some of the major issues, and gage how they resolved it. For me I flat moved to authenticated time. I trust it, it works it's secure. They even renewed my keys for me. Thank you NIST. I have not had time jumps now and I pray it stays that way.

              From a university network perspective, the use of authenticated NTP with NIST is an improvement over the non authenticated version. Deployment of it requires it be tested, and a GUI that is easily accessible. Again the key should be hidden from prying eyes 👀. It's that important. Make a new username hide the key from everyone that access the firewall important.

              With that thought 💭

              @stephenw10 can NTP options be specifically assigned in user manager and be blocked for others? With reflections on this GUI patch I just tested maybe it is also a good time to check with you. I do not think many admin have had the ability to use it without custom patches. Maybe the user manager does not list it yet.

              @MatthewA1 maybe your GUI option should also be included in a user manager feature.

              You know that song 🎶🎵 one thing leads to another...

              Make sure to upvote

              1 Reply Last reply Reply Quote 0
              • JonathanLeeJ
                JonathanLee
                last edited by

                https://redmine.pfsense.org/issues/15073

                I just submitted a feature request for new user NTP keys privileges profile to be added. It should specifically list NTP keys so super admin can hide them from settings.

                Screenshot 2023-12-06 at 4.11.37 PM.png

                Make sure to upvote

                M 1 Reply Last reply Reply Quote 1
                • M
                  MatthewA1 @JonathanLee
                  last edited by

                  @JonathanLee I'm thinking maybe this should be done as part of a larger update such as this:

                  • The NTP key management should be it's own tab on the Services > NTP page
                  • New permissions are for accessing this page
                  • Multiple keys may be specified
                  • An optional field for key ID field is added to the NTP Settings page on a per server/pool/peer basis. This would let users manage what key is used with which server so that
                    1. Different keys can be used for different servers (including no key for some servers)
                    2. A user with permission to configure NTP servers can use the keys without actually knowing the key values
                  JonathanLeeJ 1 Reply Last reply Reply Quote 1
                  • JonathanLeeJ
                    JonathanLee @MatthewA1
                    last edited by

                    @MatthewA1 I couldn't agree with you more. YES 💯

                    Make sure to upvote

                    1 Reply Last reply Reply Quote 1
                    • M
                      marcosm Netgate
                      last edited by marcosm

                      Are there authenticated NTP servers for public use other than the NIST ones? I wanted to test this and see what the generated ntp conf files look like, but not if the only option is to fax/snailmail a request. To be honest, it seems to me that time would be better spent implementing NTS instead.

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        MatthewA1 @marcosm
                        last edited by MatthewA1

                        @marcosm NIST actually does it completely by email now, but the website is out of date. I just got a key last week actually, and it was about a 3 day turnaround. You just email internet-time-service@nist.gov with the same information they previously wanted by mail or fax.
                        As far as I know, there is not anyone else (aside from one-off NTP servers) that provides authenticated NTP services, or at least not for free. NTP.org does not support it for sure. It looks like Canada's NRC does but for a significant fee.

                        1 Reply Last reply Reply Quote 1
                        • JonathanLeeJ
                          JonathanLee
                          last edited by

                          Did the GitHub package get merged with the updates? I saw you submitted them this morning. EPIC!!!

                          Make sure to upvote

                          1 Reply Last reply Reply Quote 0
                          • JonathanLeeJ
                            JonathanLee
                            last edited by

                            Did this github ever get merged?

                            847e417b5612f28bc1e84ca028a980df9c5c57a7

                            I can pull it in patches now

                            Make sure to upvote

                            M 1 Reply Last reply Reply Quote 0
                            • JonathanLeeJ JonathanLee referenced this topic on
                            • M
                              MatthewA1 @JonathanLee
                              last edited by

                              @JonathanLee It has not, and I have not seen any further feedback.
                              I agree these aren't all the changes that it would be nice if were implemented, but it at least takes it from an almost useless feature (because you are never going to get the key ID 1 from a shared system) to something with some problems.
                              I'm willing to add some of the missing pieces (e.g., per server authentication) but I'm not inclined to do so if it isn't going to be reviewed. As I mentioned in the Redmine issue, if someone can tell me what the most important changes needed for this to be accepted are, I'd take care of them.
                              @marcosm Sure, I think NTS would be great, but for now, at least as far as I can tell, none of the major time providers support NTS, and I doubt many GPS based time systems will support it for some time (at least the lower-end systems)

                              JonathanLeeJ 1 Reply Last reply Reply Quote 0
                              • JonathanLeeJ
                                JonathanLee @MatthewA1
                                last edited by

                                @MatthewA1 Netgate I have been told has a very small staff and strict budget, they will get to it eventually. Don't be discouraged.

                                Make sure to upvote

                                1 Reply Last reply Reply Quote 0
                                • M
                                  MatthewA1
                                  last edited by MatthewA1

                                  I made an update where authentication can be enabled or disabled per server/peer (and it actually validates that you didn't enable authentication for a pool).
                                  The latest version can be applied using the package patch using this URL if anyone wants to test:
                                  https://github.com/pfsense/pfsense/pull/4658.diff

                                  Side note: I would like to further improve this by allowing multiple keys to be configured and then have a dropdown for each server to select the key (or no authentication), but I don't see any way to do that without making some significant changes to the config.xml format. I don't think I should go down that road without input from Netgate first though.
                                  I think this needs to be done anyways to resolve some other issues such as:

                                  1. Like @marcosm pointed out on Redmine, there are two places to configure NTP servers, but they edit the same config option while implying they are separate settings
                                  2. Disabling the NTP server from Services > NTP results in ignoring time servers set in System > General Setup, but there is no indication of that on the General Setup page

                                  I'll add a couple more notes on this to the Redmine. I'm not sure if this should be a separate ticket or not either, but I think I don't want them in the same branch/PR for now.

                                  JonathanLeeJ 3 Replies Last reply Reply Quote 1
                                  • JonathanLeeJ
                                    JonathanLee @MatthewA1
                                    last edited by JonathanLee

                                    @MatthewA1 said in Authenicated NTP:

                                    Screenshot 2024-03-04 at 14.39.05.png

                                    I can see the new radio button options now it looks good

                                    Make sure to upvote

                                    1 Reply Last reply Reply Quote 1
                                    • JonathanLeeJ
                                      JonathanLee @MatthewA1
                                      last edited by

                                      @MatthewA1 Open a redline and put the patch and the GitHub into it, Netgate will see it in 2 seconds after that, I bet it will be added to the development version if you do that route.

                                      Make sure to upvote

                                      1 Reply Last reply Reply Quote 0
                                      • JonathanLeeJ
                                        JonathanLee @MatthewA1
                                        last edited by JonathanLee

                                        @MatthewA1 Only error I see so far..

                                        Screenshot 2024-03-04 at 14.48.55.png

                                        line 0 column 0 syntax error, unexpected $end

                                        Make sure to upvote

                                        M 1 Reply Last reply Reply Quote 1
                                        • M
                                          MatthewA1 @JonathanLee
                                          last edited by

                                          @JonathanLee Hmm, I'm not sure what is causing that. However, I checked an unmodified pfSense CE 2.7.2 and pfSense Plus 23.09.1 and this shows up in the logs on both of those appliances after a reboot. Also interesting is that it does not occur on a service restart, only on a system reboot.

                                          JonathanLeeJ 1 Reply Last reply Reply Quote 1
                                          • JonathanLeeJ
                                            JonathanLee @MatthewA1
                                            last edited by

                                            @MatthewA1 when I removed the patch it goes away, I think it has to do with the status page adjustments.

                                            Make sure to upvote

                                            1 Reply Last reply Reply Quote 0
                                            • JonathanLeeJ JonathanLee referenced this topic on
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.