0

The NTP standard configuration in Debian Squeeze is the following (with comments removed):

driftfile /var/lib/ntp/ntp.drift
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1

I don't understand how the two first "restrict" order works. If I refer to the manpage, the first argument of restrict must be a pointed address (Ipv4 or v6) or "default".

What this -4 or -6 order mean?

ohe
  • 145
  • 1
  • 7

1 Answers1

1

The -4 and -6 indicate addresses resolved using IPv4 or IPv6 respectively. Together they add up to default. This allows you to selectively enable ntp by protocol. As IPv6 rolls out you are likely to see similar changes in other network tools.

The Ubuntu man page for ntp.conf includes a paragraph on -4 and -6. I would expect it to be found in the Debian man page as well.

Scrivener
  • 3,116
  • 1
  • 22
  • 24
BillThor
  • 27,737
  • 3
  • 37
  • 69