리눅스 ntp.conf

IT위키

위치[편집 | 원본 편집]

/etc/ntp.conf

VI로 열어서 수정하면 된다.

예시[편집 | 원본 편집]

restrict defualt nomodify notrap noquery
restrict 127.0.0.1 
restrict restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap
restrict [대상] [권한]
server [타임 서버1]
server [타임 서버2]
...


설명[편집 | 원본 편집]

  • restict : 일종의 ALC로 대상에 대해 제한되는 권한을 나열한다.
    • restrict defualt nomodify notrap noquery : 기본적으론 모든 권한을 막는다.
    • restrict 127.0.0.1 : 대상을 적고 제한 권한을 명시하지 않으면 모든 권한을 다 허용하는 것이다.
    • restrict restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap : 저 대역의 호스트는 쿼리만 날릴 수 있다.
    • restrict [대상] [권한] : 대상을 적고 제한할 권한을 나열한다.
  • server 시간을 받아올 NTP서버를 나열한다.


설정파일 적용[편집 | 원본 편집]

# service ntpd restart