정보 보안을 향한 항해

NTP(Network Time Protocol) 서버 설정 본문

카테고리 없음

NTP(Network Time Protocol) 서버 설정

금홍자 2021. 10. 6. 17:36

프로그램 설치

 

백업 파일 생성

 

 

/etc/ntp.conf

22~25줄 주석처리

 

 

파일 마지막에 추가

 

시간이 안 맞는 host들 규제한다면

이런식으로 하면 된다

 

추가

udp 123 port 추가

 

# service iptables save ; service iptables reload

iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]

iptables: Trying to reload firewall rules:                 [  OK  ]

# setenforce 0# ntpdate pool.ntp.org

 6 Oct 17:16:54 ntpdate[4718]: step time server 211.233.84.186 offset 0.902765 sec

# service ntpd start# chkconfig --level 35 ntpd on
# ntpdate pool.ntp.org

 6 Oct 17:20:25 ntpdate[4751]: the NTP socket is in use, exiting

 

# reboot

 

외부 타임 정보 출력

 

 

ubuntu에서

 

 

방화벽 열기

패키지 설치

 

시간을 임의로 변경했다

ntp service 시작

 

sync 맞췄다