Pfsense Date & Time
-
Hi,
Scenario -: I'm using pfsense 2.1.
Problem -:How I can update current Date & Time in pfsense. It shows me back Date & Time i.e SUN 3 JAN UTC 2010.
Thanks in advance.
-
go to system ->general setup-> time zone and set zone according to your countryโฆ
did time reset after power off and on???
if yes than youe motherboard CMOS Battery finished change th battery(cell) -
No this thing is not work in my work. I can try with power off & on as well as reboot option.
Did anyone have solution for same??? -
Ok, so it didn't work. What steps did you take to check that it didn't work? Have you checked the date/time in the BIOS at startup? Have you checked that the correct timezone is set as suggested by ishtiaqaj? For that matter, what date/time are you getting? Is it the correct date but out of sync by a few hours? Or is it set to something like 1990? The latter would suggest a CMOS battery issue.
-
Ok, so it didn't work. What steps did you take to check that it didn't work? Have you checked the date/time in the BIOS at startup? Have you checked that the correct timezone is set as suggested by ishtiaqaj? For that matter, what date/time are you getting? Is it the correct date but out of sync by a few hours? Or is it set to something like 1990? The latter would suggest a CMOS battery issue.
Steps -: General Setup -> Timezone -> Choose timezone then reboot or power off or on the pfsense.
No i'm not getting correct date it show me old date & time Fri Jan 1 4:10:52 UTC 2010, Their is no CMOS battery issue. -
@ashi_220:
No i'm not getting correct date it show me old date & time Fri Jan 1 4:10:52 UTC 2010, Their is no CMOS battery issue.
Your time is over six years out. I repeat, have you checked the date/time in your system BIOS at bootup?
-
@ashi_220:
No i'm not getting correct date it show me old date & time Fri Jan 1 4:10:52 UTC 2010, Their is no CMOS battery issue.
Your time is over six years out. I repeat, have you checked the date/time in your system BIOS at bootup?
Yeah, Now it is changed & show me current date & time. I change Date/time in BIOS settings.
But one thing that how it is changed & getting six year old date/time when i was not change any date/time settings??Thank u very much :)
-
Configure a NTP server under System>General Setup.
-
@ashi_220:
how it is changed & getting six year old date/time when i was not change any date/time settings??
My guess is that your CMOS battery may be running low generally, though maybe not enough to bomb out completely. Might be worth replacing it in the long run, and also do what cmb suggests and set an NTP server in your settings.
-
-
@ashi_220:
how it is changed & getting six year old date/time when i was not change any date/time settings??
My guess is that your CMOS battery may be running low generally, though maybe not enough to bomb out completely. Might be worth replacing it in the long run, and also do what cmb suggests and set an NTP server in your settings.
I think their may be issue of CMOS battery. I had already configure NTP server.
-
-
@Iahmad
I have the same issue. My BIOS time is correct.
Is there anyway I can set time by command prompt. -
@Cleetus-Antony said in Pfsense Date & Time:
I have the same issue. My BIOS time is correct.
Is your BIOS time UTC or local?
Linux/FreeBSD requires it to be UTC time
Then make sure to configure the correct timezone for your location.
-
And why wouldn't the pfSense build in NTP client work for you ?
Or isn't your pfSense connected to the Internet ? -
@Gertjan PFSENSE connected to internet and everything is working. Clients r getting internet thru pfsense. When I want to create rules with scheduler, due to time wrong time, the rule doesnt work as indented for clients. Any clue ?
-
@elvisimprsntr
I set the correct time zone in pfsense. Date is correct. but the time is few hours difference. Looks like the time in BIOS is local. there is no option I can see in BIOS to change to UTC. What am I missing ? -
This post is deleted! -
simply set the BIOS time to UTC HH:MM:SS
https://www.timeanddate.com/worldclock/timezone/utc
-
@elvisimprsntr
Time in BIOS is correct and its in UTC format. Still I installed new battery in motherboard.
But even after setting correct time zone in pfsense, time is 7 Hours ahead. -
- GUI: stop NTP service
- CLI: ntpdate time.nist.gov
- GUI: restart NTP service
-
This post is deleted! -
Did the same. I got below msg on output.
Still the time is wrong.. Now 4 Hours 30 min difference.14 Jun 19:03:04 ntpdate[63408]: the NTP socket is in use, exiting
-
@elvisimprsntr
14 Jun 19:14:57 ntpdate[69805]: no server suitable for synchronization foundthis is the result of second try
-
@elvisimprsntr
"DNS Resolver is stopped or Disabled" when we chk the tatus of DNS Resolver.
In the DNS Resolver page, the Enable DNS Resolver tick mark is ON
May be NTP server setting is not resolving ??????
DNS Resolution behavior is set as Default.(First use local and fall back to remote)DNS forwarder is ON and working.
-
@Cleetus-Antony said in Pfsense Date & Time:
DNS forwarder is ON and working.
Then the NTP client can resolve.
-
@Gertjan But no effect. Tried all the ways . Time is still 4 and half hour ahead.
-
@Gertjan
14 Jun 19:14:57 ntpdate[69805]: no server suitable for synchronization foundThis response means any issue with DNS ?
-
Noop.
A (the pfSense) NTP client syncs with an NTP server, typically an IP (and in that case : no DNS needed ;) ), a host name or even a pool.
It tells you it wasn't able to do so.Example :
I'm in France, so I used a local NTP server pool :Because you should never 'type in stuff without checking, I've checked this "2.fr.pool.ntp.org" :
[24.03-RELEASE][root@pfSense.bhf.tld]/root: dig @127.0.0.1 2.fr.pool.ntp.org +short 195.154.226.102 149.91.80.92 91.224.149.41 82.64.81.218
This tells me 3 things :
The pool is a pool, there are several IPs.
The 'host name' resolves to IPs.
And, bonus : my DNS works.My 'NTP' is happy of course :
Hummm : the status told me my check was wrong ....
Ok, again :[24.03-RELEASE][root@pfSense.bhf.tld]/root: dig @127.0.0.1 2.fr.pool.ntp.org AAAA +short 2001:41d0:801:2000::acb 2001:41d0:304:200::6803 2603:1020:802:3::a8 2001:861:4080:81b1::3
Also fine.
-
@Gertjan said in Pfsense Date & Time:
dig @127.0.0.1 2.fr.pool.ntp.org +short
Thank u for the info.
My NTP is sad. -
johnpoz LAYER 8 Global Moderatorlast edited by johnpoz Jun 14, 2024, 12:57 PM Jun 14, 2024, 12:55 PM
@Cleetus-Antony well your never going to sync if you can not resolve anything in the pool name your using.
If you try and resolve that fqdn, what do you get back?
23.09.1-RELEASE][admin@sg4860.home.arpa]/root: dig 0.in.pool.ntp.org ; <<>> DiG 9.18.16 <<>> 0.in.pool.ntp.org ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21553 ;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;0.in.pool.ntp.org. IN A ;; ANSWER SECTION: 0.in.pool.ntp.org. 3600 IN A 157.245.102.2 0.in.pool.ntp.org. 3600 IN A 162.159.200.123 0.in.pool.ntp.org. 3600 IN A 162.159.200.1 0.in.pool.ntp.org. 3600 IN A 95.216.192.15 ;; Query time: 326 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP) ;; WHEN: Fri Jun 14 07:54:50 CDT 2024 ;; MSG SIZE rcvd: 110
Also you have 2 notifications I see up there the red bell with 2 next too it - those are normally things you should pay attention too, and quite often point out stuff that had an error, etc..
-
-
@Cleetus-Antony ok well its resolving... So that is good.. Odd that ntp doesn't show that, I would think it would show the IPs it resolved and then if couldn't talk to them the reach would just be at zero, etc..
But yours is showing nothing, like it couldn't resolve what IPs are in the pool? Is that maybe a O vs a 0 (zero)?
You could try putting in say one of those IPs directly vs as a pool and see if it shows that IP.. And can it talk to it.. I would then sniff on your wan to validate its sending ntp, and maybe you just don't get an answer?
-
Do you have a PC with a windows OS ? or any OS actually, as every device has a ntp client these days.
Get any of the IP's, and give it to your ntp windows client :and test it.
Still doesn't work ?
Start checking your upstream 'WAN' (ISP ?) connection. Some one might be filtering upstream.
You don't have any pfSense floating firewall rules, right ? -
I have no additional rules set. All default ones.
Before this ntp, I used pfsense default ntp settings. Stil the issue was same. -
I put one of the ip into ntp. its not reaching.
But from pfsense, its pinging.
๐ Log in to view -
The firewall can notify administrators of important events and errors by displaying an alert in the menu bar, indicated by the bell icon. Out of cuirosity what are your notifications?
-
@Cleetus-Antony pinging is different than ntp.. While ping is good that you can actually get there.. Doesn't mean its answering ntp, or that it even sees your ntp query..
First thing is to actually validate your ntp query is leaving your wan, and has been natted to your IP.. If you see the query go out - and get no answer.. Not something pfsense can have any control over.. You would then need to look up stream if something is blocking, etc...
-
Notifications was not related NTP.
It was abt some user settings. -
@johnpoz
I checked with a windows client pc connected after the pfsense and configured the ntp 1.in.pool.ntp.org and synced the time. it does well. but the same ntp server is not reaching in pfsense... strange huh ?My pfsense is behind the FTTH modem/router in which 1.in.pool.ntp.org is configured and it does the job. So we can conclude that this ntp is not being blocked in upstream right ???
-
@Cleetus-Antony said in Pfsense Date & Time:
So we can conclude that this ntp is not being blocked in upstream right ???
if your client can talk to it, yeah - but still doesn't validate pfsense is actually sending or natting the traffic.. Or that it likes the answer? A simple sniff would allow you to validate that it talks and gets an answer and what that answer actually was, etc.
It takes all of a few seconds to do a sniff.. Longest part would be waiting for the timer of when ntp would resend, which is like 64 seconds.
Also ntp 1.in.pool.ntp.org is not what you were showing you were using in pfsense.. You were using 0. Or the 1 specific IP, etc.