Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.