Posted: Tue Feb 23, 2016 8:57 Post subject: Add NTP server to DD-WRT or not?
I am wondering if there are more DD-WRT enthusiasts who would like to see the router serve as a NTP server.
My personal reason is that I have several devices that do not need to access the anything outside my LAN, except for time-syncing.
Right now I fixed this with an IP tables rule, but I prefer to just reject all 'forwarded' traffic.
No info for configuring OpenNTPD as a time server but I'm assuming standard configuration will work.
In addition, ntpd is installed as /sbin/ntpd. Does this work as expected? It's a symlink to /sbin/rc, so....
Original post -->
In case this isn't supported by dd-wrt long-term -- and I understand there's a major problem of firmware image size versus package bloat in dd-wrt beta releases -- one might consider installing OpenWRT's ntpd package via ipkg:
I strongly vote for this. I tried without success to install a NTP server on my DD-WRT router. I probably lack of knowledge on Linux and DD-WRT programing.
I am now using a Raspberry PI as my LAN NTP server and it is working fine but I think it as to be done by the router.
I know that routers do not have a real time clock, but most of us do not need extremely high accuracy, just be able to set the time to a few seconds is enough.
On the Raspberry PI, one can install a real time clock, but by default it use a fake real time clock. The actual time is regularly saved on a file and reloaded after a reboot. This way, NTP is able to acquire the precise time faster.
For these kind of services, get a SoC, Raspberry Pi or something and run them on there.
Possible uses for RPi
OpenVPN on small flash routers
RADIUS for fine grained AAA services
None of this needs to be on the router, in fact, should it even be on the router? I don't believe it should since the router should be doing routing and not these other non-routing related services.
Router for routing, SoC/appliance for services.
SoC boards are cheap as pie
The more services you put onto a router, the less processing power is available for routing tasks.
You really want to spread the loading of tasks. Having one magic box to rule them all, is just a big box of failure waiting to happen, once that goes down, everything goes down. You want reliability and availability.
For these kind of services, get a SoC, Raspberry Pi or something and run them on there....
Some people prefer one box rather than a cobbled together fragile collection of SoC boards patch cables and USB power supplies.
My idea. And yes, it is because it can. There are multiple solutions/fulfillment to any problem/wish, but personally I like to see the router as a center of my network. It sounds like a a nice feature to me, but the poll is to check if more people think of it that way. And so far there are.
If a NTP server were implemented in dd-wrt it would also need to be fully configurable to, for instance, sync to multiple NTP servers for reliability.
Since the router only syncs time after its boot, I have a small (cron) script that does this more frequent. You could make a script that first pings the NTP server and if the result is OK, uses it for a time-sync. _________________ Netgear WNDR4300v1 DD-WRT v3.0 BS r29837 | Netgear R6400 DD-WRT v3.0 KB r33525M | Tickets: 5429 IPv4 & IPv6-PD | ProFTP & Samba to USB thumb | DNSMasq DHCPv6 | Pi-Hole on RasPi
In my case my internet connection is so bad (most likely doesn't apply to you) that ntpd often fails to get internet time so I tell the ntp server to prefer the local clock by appending this to ntp.conf (the fudge stratum part pretends that the local clock is of better quality than it really is so clients still accept my server's time):
server 127.127.1.0 prefer # local clock
fudge 127.127.1.0 stratum 10
To update the local clock every eight hours because my internet connection is so bad (most likely doesn't apply to you) using ntpdate Administration->Management->Cron:
0 */8 * * * root /opt/bin/updateclock.sh
I don't have ipkg or opkg on any of my routers. So, how does one install additional packages without them? I looked at Entware-ng but there's got to be a simpler/easier/better way to install packages instead of wading through all that Entware configuration.