Testing NTP for Cameras

SpacemanSpiff

Known around here
Joined
Apr 15, 2021
Messages
1,469
Reaction score
2,473
Location
USA
OP's NTP Server is not experiencing DNS issues, OP stated evidence of the NTP server they set-up as successfully working:

Running ' sudo ntpdate -u 0.asia.pool.ntp.org ' returns:

31 Jul 15:09:50 ntpdate[31308]: adjust time server 133.243.238.243 offset -0.000535 sec
 

Teken

Known around here
Joined
Aug 11, 2020
Messages
1,570
Reaction score
2,815
Location
Canada
OP's NTP Server is not experiencing DNS issues, OP stated evidence of the NTP server they set-up as successfully working:
Yes, but I’m not trying to address that specific point. The camera needs a good known DNS entry in the camera. The image capture shows 0.0.0.0 and later was changed to point to the NTP server which is incorrect.

Trying to get the OP to have a base line and build from there. Which leads to the most basic the camera should be defaulted to a OEM state. Verify what the networks DNS, Gateway, NTP are seen and if it does access and update correctly.

If the time can be synced and reach out to the Internet it’s something internal. Which leads to again BASE 1 of making sure the Linux NTP Server can reach the internet reliability with no less than three different NTP providers not using three exact Asia servers.

If both can reach the internet and update it’s time. Pointing the camera to the local Linux NTP Server should be as simple as entering that target machines IP address.

I haven’t seen anything that leads me to taking a single camera to validate it will update it’s time via the sync to PC. I’ve not seen anything where they have changed the cameras DNS to use 9.9.9.9 and correct Gateway and to point to another NTP Server on the net.

This is basic troubleshooting to determine if the hardware has access to the local PC to time sync or to the outside world to do the very same.

Build from there . . .

Haven’t seen what the actual DNS, Gateway is for the Router / Modem. Kind of important if something is to get outside.
 

SpacemanSpiff

Known around here
Joined
Apr 15, 2021
Messages
1,469
Reaction score
2,473
Location
USA
Kudos to OP establishing an Ubuntu box, and successfully installing an NTP server service. The issue remains, based on the thread title, that cameras are not syncing with the local NTP server they set-up.

Hopefully OP will respond soon with some detailed feedback on their most recent changes, and the (hopefully) positive results.
 

chrisexr

n3wb
Joined
Jul 30, 2021
Messages
5
Reaction score
0
Location
SG
In your last post you mention:


I will answer you with your own previous post:



According to your own posts, you are running an NTP server on Linux Ubuntu 18.04.

Have you entered the IP address of the Ubuntu machine in the NTP Server field on the camera yet?
Yea, I did, The numbers I put are in the thumbnails in my previous post.

NTP server: 192.168.2.101
Port: 123

Did you restart the NTP service after making the log file changes to the config?
Sry, it slipped my mind. I restarted and the logs are in the attached file. What output do I have to expect/look out for if a camera is synced to the server?

For the dns, I gotta give it a try but I get the general idea is to get 1 camera synced to the internet's NTP server first?
 

Attachments

SpacemanSpiff

Known around here
Joined
Apr 15, 2021
Messages
1,469
Reaction score
2,473
Location
USA
...
For the dns, I gotta give it a try but I get the general idea is to get 1 camera synced to the internet's NTP server first?
Are your cameras on the same network as your NTP server (192.168.2.x )?

It appears your Ubuntu NTP server is working, you should be able to point your cameras time server setting to the IP address of the NTP server you set-up (no DNS name required). Side note: best practice is to have your cameras on their own network, isolated from the Internet.
 

mikeynags

Known around here
Joined
Mar 14, 2017
Messages
1,035
Reaction score
940
Location
CT
Yea, I did, The numbers I put are in the thumbnails in my previous post.

NTP server: 192.168.2.101
Port: 123



Sry, it slipped my mind. I restarted and the logs are in the attached file. What output do I have to expect/look out for if a camera is synced to the server?

For the dns, I gotta give it a try but I get the general idea is to get 1 camera synced to the internet's NTP server first?
I don't see any clients connecting to the NTP server in this log.

This server also appears to have a direct Internet connection from what I see here in the log:
Listen normally on 5 ham0 25.5.247.16:123
Not sure why this Linux server appears to be connected to your internal LAN and the Internet at the same time. Not a good idea if it is.

Also - this is concerning as well: ntpd exiting on signal 15 (Terminated) - it appears the NTP service is terminated for some reason.
 
Last edited:

mikeynags

Known around here
Joined
Mar 14, 2017
Messages
1,035
Reaction score
940
Location
CT
Made edits to my last post due to lack of enough coffee :) - what network are the cameras on? Are you sure they have a route to 192.168.2.101?
 

chrisexr

n3wb
Joined
Jul 30, 2021
Messages
5
Reaction score
0
Location
SG
Yea, pretty sure, they are connected to the same switch. I can access them via browser as well to do their config. They are all on the 192.168.2.x range.

The termination line probably came when I restarted the service.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
Listen normally on 5 ham0 25.5.247.16:123
Not sure why this Linux server appears to be connected to your internal LAN and the Internet at the same time. Not a good idea if it is.
Agreed.
And what's even more weird :
organisation: ORG-DMoD1-RIPE
org-name: UK Ministry of Defence
country: GB
org-type: LIR
address: UNITED KINGDOM
address: London
address: SW1A 2HB
address: Whitehall
phone:
removed phone number

admin-c: MN1891-RIPE
abuse-c: MH12763-RIPE
mnt-ref: RIPE-NCC-HM-MNT
mnt-ref: UK-MOD-MNT
mnt-by: RIPE-NCC-HM-MNT
mnt-by: UK-MOD-MNT
created: 2004-04-17T12:18:23Z
last-modified: 2021-04-16T15:24:57Z
source: RIPE # Filtered
 

jmhmcse

Pulling my weight
Joined
Dec 30, 2018
Messages
216
Reaction score
131
Location
usa
In a very basic diagram, this is the hardware configuration and network layout you have described. Is this correct?

1628465122800.png

It seems that the Ubuntu server is reaching out and getting NTP updates from its source. As long as Port 123 is open and the service is automatically restarted upon server reboot it appears to be functioning as expected.

The 192.168.2.101 IP address can be used by any/all systems within your LAN as NTP source. The camera's setting is to update its time every one minute. Once tested and validated, you could change this to once every 15 minutes; but that's a setting of your choosing.

Also, as the camera is on the same network address (192.168.2.0/24) you do NOT need to provide DNS entries on the camera. (i would recommend removing these entries as to prevent the camera from phoning home)

Do you have DNS running on the Ubuntu server? If not, do not use its address as a DNS server.

At the bottom of the GENERAL/Date & Time TAB you should be able to update (i.e. test/validate) the camera's date/time setting by clicking on the REFRESH button.

EDIT:

I presumed that the Ubuntu's IP address is either statically assigned or reserved in DHCP. If not, that needs to be corrected.
 
Last edited:
Joined
May 1, 2019
Messages
2,215
Reaction score
3,504
Location
Reno, NV
To tackle my Home Assistant 'Chrony' NTP server to feed time across my network... at first, all of my cameras would not update. I used a spare windows laptop I had laying around and tried to use that to see if it was the cameras or a config issue. Well, even the windows laptop couldn't connect to the local NTP server. I was going across differend subnet VLANS (HA was on 192.168.2.XXX while my cameras are on 192.168.4.XXX) so it was a firewall issue. You are not dabbling with different subnets or VLANS though. Hmm.
 
Top