NTP Configuration file

Hi,
Could you please explain about "restrict" parameters in /etc/ntp.conf in ntp client and ntp Servers.

Example:

restrict 127.0.0.1
restrict -6 ::1
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

Regards,
Mastan

"restrict" always expects an IP address (and optionally a netmask) and a flag. If no flags are specified it means there are no restrictions to the access you're providing (full access).

So, the first two lines means you are giving full unrestricted access to localhost with both IPv4 and IPv6 addresses.

The second line gives access to the whole subnet 192.168.1.0/24, with the exception of modifying the time (nomodify) or querying the ntpq subsystem (notrap) which is used in some cases to get logging information from the remote hosts; everything else is allowed.

Take a look at man ntp.conf for detailed info.