Need Ruleset to Force NTP Queries to Local Host

Ipfire newbe. I have simple RED/GREEN zones. I have a local stratum1 NTP server. I have some iOT devices that query external NTP and I wish to force them to my internal NTP server. Any help with rules would be greatly appreciated.

I used this guide to redirect DNS.

Redirecting Services

I tried NTP as well and both worked.

3 Likes

Thanks for your reply. I read the Redirecting Services info, both redirect and port forward portions. I don’t believe either applies to my situation. Redirect requires the NTP service to be running on the firewall, and port forward forwards packets from RED to GREEN. In my case, my NTP server and errant requestor(s) are both in GREEN. I need to forward GREEN/any NTP to GREEN/192.168.1.x NTP. What am I missing here?

Are your iOT devices DHCP clients? If so, you can drop NTP address(es) into the DHCP server.

Some IoT devices hard code their NTP and DNS IP’s and therefore will ignore the info coming from any other IP.

2 Likes

You can try the redirect rule from a few links earlier, but instead of directing it to IPFire, you can direct it to your NTP server, although something tells me the UI doesn’t like the redirecting to somewhere on its own LAN. It can be done with custom iptables rules.

Thanks, Nick. If I redirect to lan, I get error message (paraphrase) “Source and destination are on same network”. I will go with the iptables solution. Thanks to all who replied. Please consider this thread closed.

1 Like