Posted: Mon Jun 25, 2018 23:08 Post subject: DDWRT Losing Time Of Day (TOD)
Hello, with the great help of everyone, I previously setup a VPN solution between 2 locations and it has mostly been working great. Here are the threads:
The problem is that the 'Primary Home (router2)' keeps losing it's time of day (TOD). When I telnet to 192.168.1.2 and type the 'date' command, I see that it is 'Jan 1970'. Because of this, my VPN stops working. Rebooting or resetting the router seems to fix the problem. From the uptime of the router, I can see that the router has been up for approximately 7 days, and has lost its TOD at some point.
Does anyone know how to fix? The 'Primary Home (router1)' does not have a problem and never loses its TOD. I have attached a screen shot from 'Primary Home (router2)' with the network settings.
Thanks very much for this info eibgrad... a couple of things; on the affected router (Primary Home router2), I am not using the WAN port - only the LAN port (LAN to LAN). Also, per your suggestion in the original thread, we selected the option to 'assign the WAN to the LAN'. Knowing this information, do you suggest, or rather, will the script work?
The script is NOT dependent on having an active WAN. It's only dependent on having internet access on that device. And that's possible in a bridged (LAN to LAN) configuration so long as you specify a gateway IP and DNS server in the Router IP section. When the WAN is disabled, the router no longer has access to those settings from the upstream router, so *you* have to make sure to provide them. And at least according to the image you posted, it appears you have. Which begs the question, then why isn't it updating the date/time? As I said, I have seen this before, but I'm just not sure why things go wrong. So the script may help.
Thank you... I will try the script on Friday once I'm back in front of the routers.
Joined: 16 Nov 2015 Posts: 6445 Location: UK, London, just across the river..
Posted: Tue Jun 26, 2018 14:55 Post subject:
well i tried this script instead and on my R7800 & R7000 it gets stuck by connecting to NTP server, tried with few others but no avail..no internet access at all..
do i have to disable the GUI NTP option first...??
also they are 2 scripts so its better to do them one by one via CLI otherwise copy paste its funny but i guess it works,
could you do it via GUI commands field ? (have to remove all "")....
i do have a jffs on NTFS USBflash drive and i can see this file created and can edit it with vi.... _________________ Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
As mentioned in my last post, I hope to try the script tomorrow afternoon sometime. Also, in my original post, I didn't mention I have the NTP client enabled (see attached pic). I'm not sure if this could be part of the problem? Meaning, should I try disabling this for a couple of weeks 'before trying the script' to see if I still lose TOD with the NTP client disabled?
Joined: 16 Nov 2015 Posts: 6445 Location: UK, London, just across the river..
Posted: Fri Jun 29, 2018 4:50 Post subject:
i can tell you that something is not wright with your setup just by looking at this picture posted...
also stop asking a questions that nobody can answer...
its you to test and report.... _________________ Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Ok, after trying out the script this afternoon, it does not appear to work. With the script in place, and even after rebooting the router, the date on the 'PHrouter2' shows Dec 31, 1969 (previously, if I just rebooted the router with no script, it would update the time to the current TOD for a short period of time). Here is what I did:
- first, I went into the web GUI (Setup, Basic Setup), and disabled the NTP client. As mentioned initially, the NTP client has always been enabled.
- then went into Administration, Management and enabled JFFS2 Support (enable 'Internal Flash Storage'). I also enabled the 'Clean Internal Flash Storage' per the wiki (https://wiki.dd-wrt.com/wiki/index.php/Journalling_Flash_File_System)
- I also changed the NTP server from 'time.apple.com' to 'pool.ntp.org'
A couple of things:
- how does the script know about the time offset?
- also, from looking at line 18 and 20, since in the original solution, this device never gets a WAN IP address (this is part of the working solution provided), it seems like this script will never work. When I type 'nvram get wan_gateway' from the CLI, it returns 0.0.0.0.
I have 7 dd-wrt devices connected to my main network that are up 24/7.
Ranging from EA8500, WNDR3700v4, WNR2000v3, E2100L units + WRT54G & WAP54G units.
They all have WAN disabled & DHCP disabled but have main router IP as gateway.
NTP Client is enabled.
Time Zone is set correctly.
Server IP/Name is left blank (dd-wrt built-in works fine).
They all keep correct time and have for very long time, several years
I have 7 dd-wrt devices connected to my main network that are up 24/7.
Ranging from EA8500, WNDR3700v4, WNR2000v3, E2100L units + WRT54G & WAP54G units.
They all have WAN disabled & DHCP disabled but have main router IP as gateway.
NTP Client is enabled.
Time Zone is set correctly.
Server IP/Name is left blank (dd-wrt built-in works fine).
They all keep correct time and have for very long time, several years
Thank you... I will try on Tuesday and see if this works.
known issue, ddwrt cant handle setting a date/time manually, it depends on having wan. dont ask why.
Unfortunately I am not setting the date / time manually. This device appears to lose its NTP time / date after a short period of time (maybe a week or so).
Joined: 16 Nov 2015 Posts: 6445 Location: UK, London, just across the river..
Posted: Mon Jul 02, 2018 4:49 Post subject:
gil_happy wrote:
tatsuya46 wrote:
known issue, ddwrt cant handle setting a date/time manually, it depends on having wan. dont ask why.
Unfortunately I am not setting the date / time manually. This device appears to lose its NTP time / date after a short period of time (maybe a week or so).
well, forgive me if im wrong but, did you start with telling us what is your device (brand) and current build running at the first place...
update to a new build...and try again
do a reset before and after and try again
do no restore settings from files especially from different builds
do manually edit and put your settings after update...
just use the NTP server setting on DD-WRT its working on the last builds
or set a IP to fetch the time...google NTP 216.239.35.4 _________________ Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
known issue, ddwrt cant handle setting a date/time manually, it depends on having wan. dont ask why.
Unfortunately I am not setting the date / time manually. This device appears to lose its NTP time / date after a short period of time (maybe a week or so).
well, forgive me if im wrong but, did you start with telling us what is your device (brand) and current build running at the first place...
update to a new build...and try again
do a reset before and after and try again
do no restore settings from files especially from different builds
do manually edit and put your settings after update...
just use the NTP server setting on DD-WRT its working on the last builds
or set a IP to fetch the time...google NTP 216.239.35.4
No problem.. I didn't specifically provide this information, however here is the info:
- device brand = Linksys WRT1900AC
- current built = r34080 (Dec 14/17)
- are you saying to perform a factory restore before and after upgrading to a newer firmware version? If you are, I'm not sure I'm ready to upgrade just yet as I have done a lot of configuration to the VPN router in my home. I'll probably try the other suggestion(s) first before upgrading.
34080 is build with NTP time issues i guess you'd need to update to a new build and try again...
do keep in mind you may have to generate new VPN key if there are
updates on VPN module too or to read about any related issues according the build you installed , so stick to the new build threads read and try... _________________ Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913