[glux] ancora chrony
gigi-eliotisc
eliotec@tiscalinet.it
Mon, 24 Jun 2002 10:59:11 +0200
------------Evd2upCMjtQUrxwqJ6oKTb
Content-Type: text/plain; charset="iso-8859-1"
dopo le prove fatte giovedi al glux ho installato sulla mia macchina chronyd
ho avuto un piccolo problema con il firewall, dove ho dovuto modificare le impostazioni
per abilitare il protocollo udp sulla porta 323 che era bloccato
dove non riesco a cavare il ragno dal buco e' sulla impostazione
per le connessioni intermittenti
nelle istruzioni(punto 3.2.2)
dicono di modificare i file /etc/ip-up(e ip-down)
aggiungendo:
/usr/local/bin/chronyc <<EOF
password xyzzy
online
EOF
io ho una connessione adsl e gli script di connessione sono adsl-start (stop)
e quindi ho aggiunto le righe li.
solo che la cosa non sembra funzionare non capisco perche'
specifico che manualmente da chronyc
la pw viene accettata
i comandi online e offline vengono eseguiti.
allego
chrony.txt = istruzioni
chrony.conf
in chrony.keys c'e' solo la password:
1 xyxxyxy
datemi una dritta!!!!!
ciao
gigi
da istruzioni chrony:
3.2 Infrequent connection to true NTP servers
=============================================
In this section we discuss how to configure chrony for computers that
have occasional connections to the internet.
3.2.1 Setting up the configuration file for infrequent connections
------------------------------------------------------------------
As in the previous section, you will need access to NTP servers on
the internet. The same remarks apply for how to find them.
In this case, you will need some additional configuration to tell
`chronyd' when the connection to the internet goes up and down. This
saves the program from continuously trying to poll the servers when
they are inaccessible.
Again, assuming that your ntp servers are called `a.b.c' and
`d.e.f', your `chrony.conf' file would need to contain something like
server a.b.c
server d.e.f
server g.h.i
However, the following issues need to be addressed:
1. Your computer probably doesn't have DNS access whilst offline to
turn the machine names into IP addresses.
2. Your computer will keep trying to contact the servers to obtain
timestamps, even whilst offline. If you operate a dial-on-demand
system, things are even worse, because the link to the internet
will keep getting established.
For this reason, it would be better to specify this part of your
configuration file in the following way:
server 1.2.3.4 offline
server 5.6.7.8 offline
server 9.10.11.12 offline
Because numeric IP addresses have been used, the first problem is
overcome. The `offline' keyword indicates that the servers start in an
offline state, and that they should not be contacted until `chronyd'
receives notification that the link to the internet is present.
In order to notify `chronyd' of the presence of the link, you will
need to be able to log in to it with the program chronyc. To do this,
`chronyd' needs to be configured with an administrator password. To
set up an administrator password, you can create a file
`/etc/chrony.keys' containing a single line
1 xyzzy
and add the following line to `/etc/chrony.conf' (the order of the
lines does not matter)
commandkey 1
The smallest useful configuration file would look something like
server 1.2.3.4 offline
server 5.6.7.8 offline
server 9.10.11.12 offline
keyfile /etc/chrony.keys
commandkey 1
driftfile /etc/chrony.drift
The next section describes how to tell `chronyd' when the internet
link goes up and down.
3.2.2 How to tell chronyd when the internet link is available.
--------------------------------------------------------------
To use this option, you will need to configure a command key in
`chronyd's' configuration file `/etc/chrony.conf', as described in the
previous section.
To tell `chronyd' when to start and finish sampling the servers, the
`online' and `offline' commands of chronyc need to be used. To give an
example of their use, we assume that `pppd' is the program being used
to connect to the internet, and that chronyc has been installed at its
default location `/usr/local/bin/chronyc'. We also assume that the
command key has been set up as described in the previous section.
In the file `/etc/ppp/ip-up' we add the command sequence
/usr/local/bin/chronyc <<EOF
password xyzzy
online
EOF
and in the file `/etc/ppp/ip-down' we add the sequence
/usr/local/bin/chronyc <<EOF
password xyzzy
offline
EOF
`chronyd's' polling of the servers will now only occur whilst the
machine is actually connected to the Internet.
------------Evd2upCMjtQUrxwqJ6oKTb
Content-Disposition: attachment;
filename="chrony.conf"
Content-Type: application/octet-stream;
name="chrony.conf"
Content-Transfer-Encoding: Base64
c2VydmVyICA4MC44My4xOTIuMTI5IG9mZmxpbmUKCnNlcnZlciBudHAua2Fy
cG8uY3ogb2ZmbGluZQoKc2VydmVyIG50cC50dXhmYW1pbHkubmV0IG9mZmxp
bmUKCnNlcnZlciByaS5udHAuY2FybmV0LmhyIG9mZmxpbmUKCmtleWZpbGUg
L2V0Yy9jaHJvbnkua2V5cwoKY29tbWFuZGtleSAxCgoKZHJpZnRmaWxlIC9l
dGMvY2hyb255LmRyaWZ0Cgo=
------------Evd2upCMjtQUrxwqJ6oKTb--