informatica:linux:ntp
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
informatica:linux:ntp [2012/06/12 15:01] – creado javi | informatica:linux:ntp [2012/06/15 10:20] – javi | ||
---|---|---|---|
Line 3: | Line 3: | ||
ntp ntpq time | ntp ntpq time | ||
- | ===== Servidor | + | ===== Paquetes |
- | 1. Instalar paquetes: | + | Comunnes para cliente y servidor: |
- | sudo aptitude install ntp ntpdate | + | sudo aptitude install ntp ntpdate |
+ | |||
+ | ===== Servidor ====== | ||
- | 2. Actualizar configuracion: | + | 1. Actualizar configuracion: |
sudo mv / | sudo mv / | ||
Line 16: | Line 18: | ||
< | < | ||
- | TBD | + | # / |
+ | |||
+ | driftfile / | ||
+ | |||
+ | # pool.ntp.org maps to about 1000 low-stratum NTP servers. | ||
+ | # pick a different set every time it starts up. Please consider joining the | ||
+ | # pool: < | ||
+ | server 0.es.pool.ntp.org | ||
+ | server 1.es.pool.ntp.org | ||
+ | server 2.es.pool.ntp.org | ||
+ | |||
+ | # 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 | ||
+ | |||
+ | # http:// | ||
+ | # In theory I should use IP addresses on ' | ||
+ | restrict 0.es.pool.ntp.org mask 255.255.255.255 nomodify | ||
+ | restrict 1.es.pool.ntp.org mask 255.255.255.255 nomodify | ||
+ | restrict 2.es.pool.ntp.org mask 255.255.255.255 nomodify | ||
+ | |||
+ | # LAN | ||
+ | restrict 10.0.0.0 mask 255.255.255.0 nomodify notrap nopeer | ||
</ | </ | ||
- | 3. Para NTP: | + | 2. Para NTP: |
sudo / | sudo / | ||
- | 4. Sincronizar (en este ejemplo el servidor es 0.es.pool.ntp.org) | + | 3. Sincronizar (en este ejemplo el servidor es 0.es.pool.ntp.org) |
ntpdate 0.es.pool.ntp.org | ntpdate 0.es.pool.ntp.org | ||
- | 5. Arrancar NTP: | + | 4. Arrancar NTP: |
sudo / | sudo / | ||
Line 33: | Line 61: | ||
===== Cliente ====== | ===== Cliente ====== | ||
- | 1. Instalar paquetes: | + | 1. Actualizar configuracion: |
- | + | ||
- | sudo aptitude install ntp ntp-simple ntpdate | + | |
- | + | ||
- | 2. Actualizar configuracion: | + | |
sudo mv / | sudo mv / | ||
Line 44: | Line 68: | ||
< | < | ||
+ | # / | ||
+ | |||
driftfile / | driftfile / | ||
+ | |||
server time-1.dev.jj.com | server time-1.dev.jj.com | ||
- | restrict -4 default | + | |
- | restrict -6 default | + | restrict -4 default |
+ | restrict -6 default | ||
restrict 127.0.0.1 | restrict 127.0.0.1 | ||
restrict ::1 | restrict ::1 | ||
+ | restrict time-1.dev.jj.com | ||
</ | </ | ||
- | 3. Para NTP: | + | Sincronizamos el cliente contra el servidor (time-1.dev.jj.com) y permitimos acceso local, todo lo demas lo cerramos. |
+ | |||
+ | 2. Parar NTP: | ||
sudo / | sudo / | ||
- | 4. Sincronizar (en este ejemplo el servidor es time-1.dev.jj.com) | + | 3. Sincronizar (en este ejemplo el servidor es time-1.dev.jj.com) |
ntpdate time-1.dev.jj.com | ntpdate time-1.dev.jj.com | ||
- | 5. Arrancar NTP: | + | 4. Arrancar NTP: |
sudo / | sudo / | ||
- |
informatica/linux/ntp.txt · Last modified: 2015/04/13 20:19 by 127.0.0.1