Public domain
cp /etc/ntp.conf{,.bak}
# Upstream time servers
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
restrict 0.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 1.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 2.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
# Clients
restrict 127.0.0.1
restrict 172.31.0.3 mask 255.255.255.255 nomodify notrap
ntpdate -v 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org
ntpdate -v 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org
ntpdate -v 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org
chmod +x /etc/rc.d/rc.ntpd
/etc/rc.d/rc.ntpd restart
ps -A | grep ntp
sleep 60
ntpq -p
iptables -A INPUT -p udp --dport 123 ! -s 172.31.0.3 -j DROP
Cisco-3750#configure terminal
Cisco-3750(config)#ntp server 172.31.0.254
Cisco-3750(config)#exit
Cisco-3750#wri mem
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch24_:_The_NTP_Server
BY: Pejman Moghadam
TAG: ntp, cisco
DATE: 2012-08-18 11:08:01