NTP on Pi3 and Zero W

I just got my Pi Zero W this week and got it up and running pretty quickly and easily (Raspbian Jessie) after reading about “headless setup” from several sources on the Internet.

I only had one major issue and that was that the Pi wouldn’t sync time (NTP) over wifi, to Internet NTP servers or one I setup on my original Model B pi that is setup as my DNS server using the PI Hole package.

Mr Google told me that many other people are having the same issue and over two days and nights I tried most of the solutions not requiring any hardware additions or alterations but none of them worked for me. I gave up on the issue then to go on to other learning experiences.

The next learning experience I tackled was to connect to my Mac Pro via USB after making the relevant changes to the config.txt and cmdlin.txt files. This worked great with the end result being my Pi Zero W connect to my Mac Pro with just a USB cable and I could VNC int the Pi and see the lovely desktop background pictures that come with Raspbian Jessie. It was when I was looking at the desktop background I settled on that I realised that the time on the Pi desktop menu bar was in sync with the time on the Mac Pro menu bar.

I confirmed that NTP was working when I was connected via USB (simulated ethernet) and not working when I was connected only via wifi.

I then setup my Pi3 that I had not da for long and confirmed that NTP on it didn’t work over wifi.

So my question is this: Is the issue related to Pi hardware, firmware or software or is it my ADSL wifi router.

Regards Marc

Some great detective work there Marc. There is a workaround (not a rock solid solution) about half way down this raspberrypi.org forum topic, I’d be very interested to hear if it helps you:


Please let me know how it goes either way!

Hi Graham,

Thanks for responding so quickly. Can you be a bit more specific about the workaround you are referring to, like who was making the suggestion.

Regards Marc

Hi Marc,
It’s about halfway on page 2 of that post.

1 Like

@Marc39526, It looks like the guys are talking about the post by SR-71 » Sat Mar 26, 2016 8:50 pm
I’ve quoted the essence here for posterity.

As workaround, add the following command
/sbin/iptables -t mangle -I POSTROUTING 1 -o wlan0 -p udp --dport 123 -j TOS --set-tos 0x00
to the file
before the exit 0 line.
Then reboot


Thanks Michael,

I did try that but it had no effect, it appears that messages to and or from the NTP servers don’t get through via wifi but do via ethernet (real or simulated in gadget mode on the Zero).

Regards Marc