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

NTP not running on backup FW?

Scheduled Pinned Locked Moved HA/CARP/VIPs
11 Posts 2 Posters 1.1k 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.
  • P
    pete.s.
    last edited by pete.s. Apr 11, 2019, 10:25 AM Apr 11, 2019, 12:00 AM

    I have a problem setting up NTP with two pfsense in HA.

    I think both server should have their NTP server up and running at all times and using their own IP address to sync to internet peers. That way they both have the right time regardless if they are master or backup and ntpd will have adjusted the clock drift on both.

    Right now I only have the NTP server syncing to internet peers on the master and not the backup. Because of this the time on the backup server drifts away and when failover occurs the time is wrong. When the backup servers becomes master it starts to sync though.

    Could this be a problem with NAT? Or is pfsense doing something with the ntpd service depending if the machine has the master och backup role?

    I couldn't really find anywhere how ntp works in HA but maybe I looked in the wrong place. Any pointers would be much appreciated!

    1 Reply Last reply Reply Quote 0
    • P
      pete.s.
      last edited by Apr 11, 2019, 1:16 PM

      OK, with ps I found that the ntpd daemon is actually running on the secondary (backup). But it can't reach any peers on the WAN so it can't sync time.

      Is this normal behavior?

      1 Reply Last reply Reply Quote 0
      • D
        Derelict LAYER 8 Netgate
        last edited by Apr 11, 2019, 6:20 PM

        What are your outbound NAT settings?

        Can the secondary ping out WAN when it is not CARP MASTER?

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        P 1 Reply Last reply Apr 11, 2019, 6:25 PM Reply Quote 0
        • P
          pete.s. @Derelict
          last edited by Apr 11, 2019, 6:25 PM

          @Derelict said in NTP not running on backup FW?:

          What are your outbound NAT settings?

          Can the secondary ping out WAN when it is not CARP MASTER?

          I'll test it when I get back into the office in a bit.

          I know I have manual outbound NAT with the WAN VIP on everything except from localhost to udp/123. I'll check it.

          1 Reply Last reply Reply Quote 0
          • D
            Derelict LAYER 8 Netgate
            last edited by Apr 11, 2019, 6:27 PM

            You need to be sure outbound NAT is using the CARP VIP for things that go through the firewall like sessions from inside clients, but that connections from the firewall itself are using the WAN address. If you make connections from the firewall itself use the CARP VIP it won't be able to connect out when it is CARP BACKUP.

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            P 1 Reply Last reply Apr 11, 2019, 6:43 PM Reply Quote 0
            • P
              pete.s. @Derelict
              last edited by pete.s. Apr 11, 2019, 6:44 PM Apr 11, 2019, 6:43 PM

              @Derelict said in NTP not running on backup FW?:

              You need to be sure outbound NAT is using the CARP VIP for things that go through the firewall like sessions from inside clients, but that connections from the firewall itself are using the WAN address. If you make connections from the firewall itself use the CARP VIP it won't be able to connect out when it is CARP BACKUP.

              OK, that makes sense.

              Should I do that by looking at the source address and if it's the WAN address then it's from the firewall itself? In which case I can use the "Do not NAT" option.

              1 Reply Last reply Reply Quote 0
              • D
                Derelict LAYER 8 Netgate
                last edited by Apr 11, 2019, 7:10 PM

                Just NAT inside subnets to the CARP VIP and NAT connections from Localhost to the WAN address. You do not want to NAT from source any or source This firewall (self).

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                1 Reply Last reply Reply Quote 0
                • P
                  pete.s.
                  last edited by Apr 12, 2019, 1:38 AM

                  I have it set like this now.
                  man_outbound_nat.png

                  1 Reply Last reply Reply Quote 0
                  • P
                    pete.s.
                    last edited by Apr 12, 2019, 1:43 AM

                    I still had problems with NTP though but I think it had to do with IPv6.

                    It looked like the NTP server got IPv6 addresses from DNS and would try to reach the peers that way.
                    These settings took care of that problem:
                    advanced_networking_ipv6.png

                    P 1 Reply Last reply Apr 12, 2019, 1:49 AM Reply Quote 0
                    • P
                      pete.s. @pete.s.
                      last edited by Apr 12, 2019, 1:49 AM

                      I had IPv6 traffic enabled under the Advanced settings not because I wanted it but because I wanted to have it blocked/rejected without logging it.

                      So I have this floating rule to do that.
                      floating_ipv6_block.png

                      1 Reply Last reply Reply Quote 0
                      • P
                        pete.s.
                        last edited by pete.s. Apr 12, 2019, 2:18 AM Apr 12, 2019, 2:17 AM

                        So now everything worked fine for a little while.

                        But then I saw this:
                        ntp_status_unreachable.png

                        Using a shell on pfsense I can ping each NTP server and I can also use ntpdate to set the clock. So basically it's not a firewall or routing problem I think.

                        NTP log doesn't show anything unusual or different compared to the master firewall.

                        I'll keep looking.

                        1 Reply Last reply Reply Quote 0
                        1 out of 11
                        • First post
                          1/11
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                          This community forum collects and processes your personal information.
                          consent.not_received