![]() | ![]() |
NTP is provided with several vendors' versions of Unix; a few vendors (notably Silicon Graphics) include services based on the older Time protocol instead of or in addition to NTP. NTP is not provided with Windows NT but is supported by timeserv, which is part of the Server Resource Kit.
By default, NTP does not include any authentication; as a result, it's easy for an attacker to forge packets with incorrect time settings. It's possible to use authentication starting in NTPv3, and you should do so.
NTP servers may also talk to each other using broadcast or multicast; the multicast address 224.0.1.1 is reserved for this purpose.
Direction | SourceAddr. | Dest.Addr. | Protocol | SourcePort | Dest.Port | Notes |
---|---|---|---|---|---|---|
In | Ext | Int | UDP | >1023 | 123 | Query, external client to internal server |
Out | Int | Ext | UDP | 123 | >1023 | Response, internal server to external client |
Out | Int | Ext | UDP | >1023 | 123 | Query, internal client to external server |
In | Ext | Int | UDP | 123 | >1023 | Response, external server to internal client |
In | Ext | Int | UDP | 123 | 123 | Query or response between two servers |
Out | Int | Ext | UDP | 123 | 123 | Query or response between two servers |
In | Ext | 224.0.1.1 | UDP | 123 | 123 | ulticast query or response from an external server |
Out | Int | 224.0.1.1 | UDP | 123 | 123 | ulticast query or response from an internal server |
Figure 22-1 shows how packet filtering works with NTP.
If you do want to run NTP across your firewall, the best way is to set up an NTP server on a bastion host that talks to multiple external NTP servers and another NTP server on some internal host that talks to the bastion host. (You want the bastion host to talk to multiple external NTP servers because it increases accuracy and makes it harder to fool.) Next, configure internal NTP clients and other internal NTP servers to talk to the internal server that talks to the bastion server. You need to configure any packet filtering system between the internal server and the bastion host to allow the following: