07-18-2023 09:53 AM
Appliance Model : Cisco ASA 5508-X
Firepower Status : Not used
ASA Version : 9.16.4
I am having trouble using NTP to synchronize time on port 123. I have set up a custom NTP server that listens to port 122, and I have verified that the synchronization works fine using the nettime client on a Windows machine. However, when I try to sync time on port 123, I encounter issues.
I checked the debug monitor on ASDM and noticed that the request is being made to the specific NTP server, but the reply takes approximately two minutes to show up on the monitor.
To clarify, I am trying to sync time using NTP, but I am only experiencing issues with port 123. I have set up a custom NTP server that works fine on port 122, but the problem arises when I use port 123. I have checked the debug monitor on the ASDM, and I can see that the request is being sent to the NTP server, but the response takes a long time to show up.
To fix this issue, I have checked the network and firewall settings to ensure that they are not causing any delays or blocking NTP traffic on port 123. I have also verified that the NTP server is correctly configured and responding to requests in a timely manner. Additionally, I have tried using a different NTP server and client to see if the issue persists.time between request and reply to show up
07-18-2023 11:39 AM
The Tear Down on the log must refers to the UPD session and not related to the NTP. But, sounds to me that the firewall is actually handling the NTP differently when you use the standard port and it is ignoring when doing not standard port.
I would recommend you to add inspection on the NTP service.
07-18-2023 01:38 PM
could you explain more ? UPD Session
where to add the inspection
07-18-2023 07:47 PM
tear down happens since its reached the global timeout value for an UDP connection which is 2 minutes
Check it with show run timout
I suggested the inspection as a mean to allow the NTP connection but it seems the ntp is not available for inspection.
07-19-2023 05:21 AM
ASA# show run timeout
timeout xlate 3:00:00
timeout pat-xlate 0:00:30
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 sctp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
timeout tcp-proxy-reassembly 0:01:00
timeout floating-conn 0:00:00
timeout conn-holddown 0:00:15
timeout igp stale-route 0:01:10
this what i got
do i need to do any thing ?
07-19-2023 05:38 AM
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 sctp 0:02:00 icmp 0:00:02
The value you see comes from this line.
But no, change the time out value will not help you. We need to figure out why the firewall is blocking the protocol on port 123 and not in port 122.
The inspection helps in situation like this but it seems the ASA does not have preemption for NTP. Can you check?
hostname(config)# policy-map test
hostname(config-pmap)# class ntp
hostname(config-pmap-c)# inspect ntp
07-19-2023 05:50 AM
This is what i got as output
ASA(config)# policy-map test
ASA(config-pmap)# class ntp
ERROR: % class-map ntp not configured
07-19-2023 06:03 AM
Yeah, that's what I though.
Is there any chance the firewall is denying the traffic on port 123 ?
07-19-2023 06:10 AM
i tried to add the port 123 on a incoming access rule that points to 172.31.192.15 but that didn't fix the problem
also the weird thing is that the issue appears from no where with no changes on the firewall, before that things were working fine with not issues
07-19-2023 06:23 AM
And the server is listening on port 123?
07-19-2023 06:27 AM
do you mean the custom server is setup ? to temporary solve the issue
07-19-2023 06:59 AM
I mean, the NTP service on your NTP server is working fine on port 123 ?
07-19-2023 07:08 AM
07-19-2023 07:32 AM
I found a solution on the internet and if you want you can test.
The dude created a static NAT only for NTP like below. You may try on your scenario.
static (dmz,outside) udp interface ntp 192.168.240.240 ntp netmask 255.255.255.255
https://serverfault.com/questions/512821/ntp-client-on-centos-5-fails-behind-cisco-asa-firewall
07-19-2023 09:22 AM - edited 07-19-2023 09:34 AM
nat (dmz,outside) source static any TVuPack2 service 123-UDP 123-UDP unidirectional
i tried this but didn't help
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide