Перейти к содержимому
Калькуляторы

Вопрос по ntpd

Есть ntpd с такой конфигурацией:

# Public NTP servers
server 0.ru.pool.ntp.org iburst maxpoll 9
server 1.ru.pool.ntp.org iburst maxpoll 9
server 0.freebsd.pool.ntp.org iburst
server 1.freebsd.pool.ntp.org iburst
server pool.ntp.org iburst burst

# NTP peers
server ntp01.local iburst

# Security
restrict -4 default ignore
restrict -6 default ignore
restrict 127.0.0.1
restrict 127.127.1.0
restrict 10.1.128.0 mask 255.255.255.0
restrict 10.0.0.0 mask 255.0.0.0 kod nomodify notrap nopeer

# Reference clock
server 127.127.1.0
fudge 127.127.1.0 stratum 10

 

Вот именно в такой конфигурации синхронизация производится только с локальным сервером ntp01. С остальными серверами синхронизации нет — т.к. задан "restrict -4 default ignore", запрещающий доступ извне.

Вопрос такой — ntp-сервера у меня указаны по hostname. Если я в restrict также буду использовать hostname, когда эти имена будут разрешаться (т.к. это пул адресов и сервера в нем периодически меняются)?

Имена будут разрешаться в IP-адрес только при старте ntp-сервиса? Или ntpd сам будет периодически делать ресолвинг имен?

 

И второй вопрос — я пробовал определить ntp01 как пир (вместо "server ntp01.local" указывал "peer ntp01.local autokey"), попутно на ntp01 добавив пира ntp02 (на данный сервер).

Но ассоциации они так и не организовали.

Где бы почитать, как это нужно делать?

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Там разрешения типа как в фаерволе пишутся.

 

### Rozhuk Ivan 2008 - 2014
### ntp.conf
### 7.x, 8.x, 9.x, 10.x
# http://www.gsp.com/cgi-bin/man.cgi?section=5&topic=ntp.conf
# http://support.ntp.org/bin/view/Support/UndisciplinedLocalClock



# GENERAL SETTINGS
enable		calibrate kernel ntp
disable		auth bclient monitor pps stats
broadcastdelay	0.004
calldelay	120
driftfile	/var/db/ntpd.drift
# logfile	/var/log/ntp.log - log to syslog!



# set self clock params
server 127.127.1.0
fudge 127.127.1.0 stratum 10


# servers to query
server -4 pool.ntp.org				burst iburst maxpoll 9 prefer
server -6 pool.ntp.org				burst iburst maxpoll 9 prefer
server -4 2.pool.ntp.org			burst iburst maxpoll 9 prefer
server -6 2.pool.ntp.org			burst iburst maxpoll 9 prefer
server -4 europe.pool.ntp.org			burst iburst maxpoll 9
server -6 europe.pool.ntp.org			burst iburst maxpoll 9
server -4 ru.pool.ntp.org			burst iburst maxpoll 9
server -6 ru.pool.ntp.org			burst iburst maxpoll 9
server -4 ntp.ubuntu.com			burst iburst maxpoll 9
server -6 ntp.ubuntu.com			burst iburst maxpoll 9
server -4 ntp.sixxs.net				burst iburst maxpoll 9
server -6 ntp.sixxs.net				burst iburst maxpoll 9
server -4 ntp.eu.sixxs.net			burst iburst maxpoll 9
server -6 ntp.eu.sixxs.net			burst iburst maxpoll 9
server -4 ntp.us.sixxs.net			burst iburst maxpoll 9
server -6 ntp.us.sixxs.net			burst iburst maxpoll 9
server -4 ntp.ap.sixxs.net			burst iburst maxpoll 9
server -6 ntp.ap.sixxs.net			burst iburst maxpoll 9



# PERMISSIONS
# default deny all
restrict -4 default ignore
restrict -6 default ignore
discard average 2 minimum 5 monitor 1

# permission for time servers
restrict -4 pool.ntp.org			nomodify nopeer noquery notrap
restrict -6 pool.ntp.org			nomodify nopeer noquery notrap
restrict -4 2.pool.ntp.org			nomodify nopeer noquery notrap
restrict -6 2.pool.ntp.org			nomodify nopeer noquery notrap
restrict -4 europe.pool.ntp.org			nomodify nopeer noquery notrap
restrict -6 europe.pool.ntp.org			nomodify nopeer noquery notrap
restrict -4 ru.pool.ntp.org			nomodify nopeer noquery notrap
restrict -6 ru.pool.ntp.org			nomodify nopeer noquery notrap
restrict -4 ntp.ubuntu.com			nomodify nopeer noquery notrap
restrict -6 ntp.ubuntu.com			nomodify nopeer noquery notrap
restrict -4 ntp.sixxs.net			nomodify nopeer noquery notrap
restrict -6 ntp.sixxs.net			nomodify nopeer noquery notrap
restrict -4 ntp.eu.sixxs.net			nomodify nopeer noquery notrap
restrict -6 ntp.eu.sixxs.net			nomodify nopeer noquery notrap
restrict -4 ntp.us.sixxs.net			nomodify nopeer noquery notrap
restrict -6 ntp.us.sixxs.net			nomodify nopeer noquery notrap
restrict -4 ntp.ap.sixxs.net			nomodify nopeer noquery notrap
restrict -6 ntp.ap.sixxs.net			nomodify nopeer noquery notrap

# permissins for clients
restrict -4 127.0.0.1				nomodify
restrict -6 ::1					nomodify
restrict -4 127.127.1.0
restrict -4 192.168.0.0 mask 255.255.0.0	limited nomodify noquery nopeer notrap
restrict -4 172.16.0.0 mask 255.255.240.0	limited nomodify noquery nopeer notrap
restrict -4 169.254.0.0 mask 255.255.0.0	limited nomodify noquery nopeer notrap
restrict -4 10.0.0.0 mask 255.0.0.0		limited nomodify noquery nopeer notrap
restrict -6 fe80:: mask ffc0::			limited nomodify noquery nopeer notrap
restrict -6 fc00:: mask fe00::			limited nomodify noquery nopeer notrap

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

×   Вставлено в виде отформатированного текста.   Вставить в виде обычного текста

  Разрешено не более 75 смайлов.

×   Ваша ссылка была автоматически встроена.   Отобразить как ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.