[mdlug] NTP server on Android for updating pi

Carl T. Miller carl at carltm.com
Mon Mar 23 05:02:12 EDT 2020


Drew, can you find some time to connect on the
mdlug jitsi meeting?  There are a few things we
can try.  Just send email to this list when you're
ready and I'll connect as soon as I'm able.

https://meet.jit.si/mdlugmeeting

c


On 3/22/20 10:04 PM, Drew wrote:
> I'm upgrading the raspberry pi-s, and have a base system set up to
> connect to either of two Android phones. As pi-s don't have real time
> clocks, and the phone that I use for it may or may not be connected to
> the internet, I've been trying to get a time server running on one  of
> the phones (https://apkpure.com/time-server/com.icecoldapps.timeserver).
>
> Of course, due to the douchebaggery of phone manufacturers, all ports
> below a certain number - 1000? I forget which, but it includes port
> 123 which NTP uses. So the Android app mentioned above has provision
> to use a port that (supposedly) is NOT blocked, and recommends port
> forwarding via iptables.
>
> By some trial and error, I've managed to get a couple of rules inserted:
>
> pi at nx13:~ $ sudo iptables -t nat -S
> -P PREROUTING ACCEPT
> -P INPUT ACCEPT
> -P POSTROUTING ACCEPT
> -P OUTPUT ACCEPT
> -A PREROUTING -s 192.168.43.1/32 -p udp -j REDIRECT --to-ports 123
> -A OUTPUT -d 192.168.43.1/32 -p udp -j REDIRECT --to-ports 39865
>
> But when I attempt a time sync to the app, I get (after a few seconds
> of silence)
>
> pi at nx13:~ $ sudo ntpdate 192.168.43.1
> 22 Mar 21:02:32 ntpdate[4555]: no server suitable for synchronization found
>
>
> pi at nx13:~ $ sudo ntpdate 192.168.43.1
> 22 Mar 21:03:39 ntpdate[4617]: no server suitable for synchronization found
>
> What do I need to do to get this to work?
> _______________________________________________
> mdlug mailing list
> mdlug at mdlug.org
> http://mdlug.org/mailman/listinfo/mdlug



More information about the mdlug mailing list