bonjur,
debian lenny 2.6.26-2 x686
j’ai installé, le ntp avec le fichier de conf suivant:
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
logfile /var/log/ntpd
driftfile /var/lib/ntp/ntp.drift
statsdir /var/log/ntpstats/
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
# You do need to talk to an NTP server or two (or three).
#server ntp.your-provider.example
# pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will
# pick a different set every time it starts up. Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
server 0.debian.pool.ntp.org iburst dynamic
server 1.debian.pool.ntp.org iburst dynamic
server 2.debian.pool.ntp.org iburst dynamic
server 3.debian.pool.ntp.org iburst dynamic
#server ntp.univ-lyon1.fr
#server ntp.imag.fr
#server ntp.laas.fr
#server ntp.unilim.fr
server 127.127.1.0
fudge 127.127.0.0 stratum 10
# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
#restrict ::1
# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
#restrict 172.16.1.0 mask 255.255.255.0 nomodify notrap
# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 172.16.1.0 mask 255.255.0.0
broadcast 192.168.1.0 mask 255.255.255.0
# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines. Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient
la prison se constitue d’un dossier chrooté, avec tout les fichiers nécessaires, puisque le démon se lance en prison sans probleme (chroot /prison /usr/sbin/ntpd -p $pidfilerelatifenprison -u $user:$group)
quand je le lance hors prison, ntpq -p donne des résultats satifaisants. Quand je le lance enprisoné, ntpq -p rend une requête timed out…
je precise que le dossier PROC est monté à la racine de la prison. le par-feu est bien ouvert puisque hors prison ca marche…
PKOI Y FE CA?
ca c’est hors de la prison:
[code]#/home/CHROOT/ntpd/>ntpq -p
remote refid st t when poll reach delay offset jitter
*ddb3.europeacon 138.96.64.10 2 u 17 64 377 602.197 72.647 101.469
+web01.ookoo.org 145.238.203.14 2 u 35 64 377 635.538 54.671 103.058
dnscache-paris. 140.203.204.77 2 u 469 64 200 616.277 69.821 10.814
+ks35603.kimsufi 91.121.45.45 3 u 25 64 377 600.334 77.057 29.078
LOCAL(0) .LOCL. 5 l 59 64 377 0.000 0.000 0.001
[/code]
ca c’est dedans
#/home/CHROOT/ntpd/>ntpq -p
localhost: timed out, nothing received
***Request timed out
…