I thought my NTP redirection was working, but upon further inspection, I see it is not. It appears to only work for clients that explicitly use the NTP server's IP address.
This is my relevant pf conf:
On the client, I am running:
I ran a tcpdump on the NTP box and I see the traffic going to the NTP server and it responding, but the client doesn't process the response. I see the same traffic on the client itself, so it seems like the redirect works, but I don't get any indication of the NTP offset or delay.
Whereas, if I run
I get the offset or delay.
sntpc -n 54.197.201.246 returns exit status of 255. The tcpdump capture shows a disconnected stream - the response to the query is not part of the request when selecting follow UDP stream. The IP portion of the packet in the response is set to the local IP address of the NTP server. The problem is that it is not rewriting the address in the response.
The examples I see are for redirecting external ingress traffic to some locally running server. I have internal egress traffic that I want to keep entirely local.
This is my relevant pf conf:
rdr pass on wired proto udp from any to any port ntp -> $LOCAL_NTP_SERVER port ntp
pass in quick on wired proto udp to (wired) port ntp
pass out quick on wired proto udp from port ntp
On the client, I am running:
sntpc -n 54.197.201.246
I ran a tcpdump on the NTP box and I see the traffic going to the NTP server and it responding, but the client doesn't process the response. I see the same traffic on the client itself, so it seems like the redirect works, but I don't get any indication of the NTP offset or delay.
Whereas, if I run
sntpc -n $LOCAL_NTP_SERVER
I get the offset or delay.
sntpc -n 54.197.201.246 returns exit status of 255. The tcpdump capture shows a disconnected stream - the response to the query is not part of the request when selecting follow UDP stream. The IP portion of the packet in the response is set to the local IP address of the NTP server. The problem is that it is not rewriting the address in the response.
The examples I see are for redirecting external ingress traffic to some locally running server. I have internal egress traffic that I want to keep entirely local.