1

Okay so I tried syncing a windows clients clock to the ubuntu ntp server i just set up, but it gets a time out, when trying.

So I went on the ubuntu server and looked at syslog:

Apr 10 13:15:01 nyborg ntpd[10608]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
Apr 10 13:15:01 nyborg ntpd[10608]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Apr 10 13:15:01 nyborg ntpd[10608]: Listen and drop on 1 v6wildcard :: UDP 123
Apr 10 13:15:01 nyborg ntpd[10608]: Listen normally on 2 lo 127.0.0.1 UDP 123
Apr 10 13:15:01 nyborg ntpd[10608]: Listen normally on 3 eth0 172.16.0.5 UDP 123
Apr 10 13:15:01 nyborg ntpd[10608]: Listen normally on 4 lo ::1 UDP 123
Apr 10 13:15:01 nyborg ntpd[10608]: Listen normally on 5 eth0 fe80::21a:a0ff:fe34:8837 UDP 123
Apr 10 13:15:01 nyborg ntpd[10608]: peers refreshed
Apr 10 13:15:01 nyborg ntpd[10608]: Listening on routing socket on fd #22 for interface updates
Apr 10 13:15:01 nyborg kernel: [187221.088756] audit: type=1400  audit(1428664501.995:42): apparmor="DENIED" operation="open"   profile="/usr/sbin/ntpd" name="/etc/ldap/ldap.conf" pid=10608 comm="ntpd"   requested_mask="r" denied_mask="r" fsuid=0 ouid=0

Something is clearly wrong, but what could it be? My ntp.conf looks like this:

# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift


# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

# Specify one or more NTP servers.

# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
server ntp2v6.unixnet.dk iburst
server fw2.unixnet.dk    iburst
server 0.dk.pool.ntp.org
server 1.dk.pool.ntp.org
server 2.dk.pool.ntp.org
server 3.dk.pool.ntp.org

# Use Ubuntu's ntp server as a fallback.
server 127.127.1.0
fudge 127.127.1.0 stratum 10

# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# 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

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
restrict 172.16.0.0 mask 255.255.255.0 notrust nomodify notrap


# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 172.16.0.255

# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines.  Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient

I moved the logfile in use, to a new logfile, to get a better overview:

# cat /var/log/ntp.log
10 Apr 13:50:54 ntpd[1483]: proto: precision = 0.109 usec
10 Apr 13:50:54 ntpd[1483]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
10 Apr 13:50:54 ntpd[1483]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
10 Apr 13:50:54 ntpd[1483]: Listen and drop on 1 v6wildcard :: UDP 123
10 Apr 13:50:54 ntpd[1483]: Listen normally on 2 lo 127.0.0.1 UDP 123
10 Apr 13:50:54 ntpd[1483]: Listen normally on 3 eth0 172.16.0.5 UDP 123
10 Apr 13:50:54 ntpd[1483]: Listen normally on 4 lo ::1 UDP 123
10 Apr 13:50:54 ntpd[1483]: Listen normally on 5 eth0 fe80::21a:a0ff:fe34:8837 UDP 123
10 Apr 13:50:54 ntpd[1483]: peers refreshed
10 Apr 13:50:54 ntpd[1483]: Listening on routing socket on fd #22 for interface updates

Edit

I got this from the cpdump -i any udp when WINDOWSCLIENT tried to update dps. Other servers try to update too, but they too have some problems:

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
13:13:18.526244 IP 172.16.0.184.17500 > 255.255.255.255.17500: UDP, length 115
13:13:18.526432 IP 172.16.0.184.17500 > 172.16.0.255.17500: UDP, length 115
13:13:19.242393 IP nyborg.mosek.intranet.46027 > braintree.mosek.intranet.0.16.172.in-addr.arpa.domain: 8414+ PTR? 255.255.255.255.in-addr.arpa. (46)
13:13:19.242879 IP braintree.mosek.intranet.0.16.172.in-addr.arpa.domain > nyborg.mosek.intranet.46027: 8414* 0/1/0 (109)
13:13:19.242971 IP nyborg.mosek.intranet.40335 > braintree.mosek.intranet.0.16.172.in-addr.arpa.domain: 26524+ PTR? 184.0.16.172.in-addr.arpa. (43)
13:13:19.243208 IP braintree.mosek.intranet.0.16.172.in-addr.arpa.domain > nyborg.mosek.intranet.40335: 26524 NXDomain* 0/1/0 (118)
13:13:19.243289 IP nyborg.mosek.intranet.33337 > braintree.mosek.intranet.0.16.172.in-addr.arpa.domain: 5477+ PTR? 255.0.16.172.in-addr.arpa. (43)
13:13:19.243535 IP braintree.mosek.intranet.0.16.172.in-addr.arpa.domain > nyborg.mosek.intranet.33337: 5477 NXDomain* 0/1/0 (118)
13:13:20.244690 IP nyborg.mosek.intranet.37520 > braintree.mosek.intranet.0.16.172.in-addr.arpa.domain: 23672+ PTR? 6.0.16.172.in-addr.arpa. (41)
13:13:20.245129 IP braintree.mosek.intranet.0.16.172.in-addr.arpa.domain > nyborg.mosek.intranet.37520: 23672* 1/1/1 PTR braintree.mosek.intranet.0.16.172.in-addr.arpa. (134)
13:13:22.280353 IP WINDOWSCLIENT.mosek.intranet.ntp > nyborg.mosek.intranet.ntp: NTPv3, Client, length 48
13:13:23.178671 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:23.178771 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:23.248569 IP nyborg.mosek.intranet.41512 > braintree.mosek.intranet.0.16.172.in-addr.arpa.domain: 38558+ PTR? 187.0.16.172.in-addr.arpa. (43)
13:13:23.248990 IP braintree.mosek.intranet.0.16.172.in-addr.arpa.domain > nyborg.mosek.intranet.41512: 38558* 1/1/1 PTR WINDOWSCLIENT.mosek.intranet. (125)
13:13:23.249081 IP nyborg.mosek.intranet.34660 > braintree.mosek.intranet.0.16.172.in-addr.arpa.domain: 29792+ PTR? 24.0.16.172.in-addr.arpa. (42)
13:13:23.249285 IP braintree.mosek.intranet.0.16.172.in-addr.arpa.domain > nyborg.mosek.intranet.34660: 29792* 1/1/1 PTR lyngby.mosek.intranet.0.16.172.in-addr.arpa. (132)
13:13:25.816123 IP harbinger.mosek.intranet.17500 > 255.255.255.255.17500: UDP, length 208
13:13:25.816446 IP harbinger.mosek.intranet.17500 > 172.16.0.255.17500: UDP, length 208
13:13:26.252742 IP nyborg.mosek.intranet.41476 > braintree.mosek.intranet.0.16.172.in-addr.arpa.domain: 62713+ PTR? 179.0.16.172.in-addr.arpa. (43)
13:13:26.253174 IP braintree.mosek.intranet.0.16.172.in-addr.arpa.domain > nyborg.mosek.intranet.41476: 62713* 1/1/1 PTR harbinger.mosek.intranet. (121)
13:13:34.817328 IP nyborg.mosek.intranet.ntp > 80-71-132-103.u.parknet.dk.ntp: NTPv4, Client, length 48
13:13:35.263075 IP nyborg.mosek.intranet.60768 > braintree.mosek.intranet.0.16.172.in-addr.arpa.domain: 37714+ PTR? 103.132.71.80.in-addr.arpa. (44)
13:13:35.263525 IP braintree.mosek.intranet.0.16.172.in-addr.arpa.domain > nyborg.mosek.intranet.60768: 37714 1/13/0 PTR 80-71-132-103.u.parknet.dk. (295)
13:13:45.190397 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:45.190502 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:46.095484 IP harbinger.mosek.intranet.ntp > nyborg.mosek.intranet.ntp: NTPv4, Client, length 48
13:13:46.192479 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:46.192490 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:46.192544 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:46.192564 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:46.192599 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:46.192626 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:46.192641 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:46.192684 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:46.192733 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:46.192736 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:46.192742 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:46.192807 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:46.192874 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:46.192879 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:46.192880 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:46.192882 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:46.192885 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:46.192904 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:46.192951 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:46.192980 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:46.193024 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:46.193097 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:46.193168 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:46.193240 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:46.193312 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:46.193384 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:46.193456 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:46.193528 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:48.597539 IP 172.16.0.184.17500 > 255.255.255.255.17500: UDP, length 115
13:13:48.597728 IP 172.16.0.184.17500 > 172.16.0.255.17500: UDP, length 115
13:13:50.155399 IP rungsted.mosek.intranet.51728 > 172.16.0.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
13:13:50.158336 IP hellerup.mosek.intranet.61275 > 172.16.0.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
13:13:50.280232 IP nyborg.mosek.intranet.49605 > braintree.mosek.intranet.0.16.172.in-addr.arpa.domain: 57245+ PTR? 116.0.16.172.in-addr.arpa. (43)
13:13:50.280516 IP braintree.mosek.intranet.0.16.172.in-addr.arpa.domain > nyborg.mosek.intranet.49605: 57245* 1/1/1 PTR rungsted.mosek.intranet. (120)
13:13:50.280599 IP nyborg.mosek.intranet.50498 > braintree.mosek.intranet.0.16.172.in-addr.arpa.domain: 31333+ PTR? 199.0.16.172.in-addr.arpa. (43)
13:13:50.280798 IP braintree.mosek.intranet.0.16.172.in-addr.arpa.domain > nyborg.mosek.intranet.50498: 31333* 1/1/1 PTR hellerup.mosek.intranet. (120)
13:13:50.812825 IP hellerup.mosek.intranet.64597 > 172.16.0.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
13:13:50.812859 IP nyborg.mosek.intranet.netbios-ns > hellerup.mosek.intranet.64597: NBT UDP PACKET(137): QUERY; POSITIVE; RESPONSE; UNICAST
13:13:51.147948 IP rungsted.mosek.intranet.50867 > 172.16.0.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
13:13:51.148020 IP nyborg.mosek.intranet.netbios-ns > rungsted.mosek.intranet.50867: NBT UDP PACKET(137): QUERY; POSITIVE; RESPONSE; UNICAST
13:13:51.165127 IP rungsted.mosek.intranet.netbios-ns > 172.16.0.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
13:13:51.167440 IP nyborg.mosek.intranet.netbios-ns > rungsted.mosek.intranet.netbios-ns: NBT UDP PACKET(137): QUERY; POSITIVE; RESPONSE; UNICAST
13:13:51.167737 IP rungsted.mosek.intranet.netbios-dgm > 172.16.0.255.netbios-dgm: NBT UDP PACKET(138)
13:13:51.167796 IP nyborg.mosek.intranet.netbios-dgm > rungsted.mosek.intranet.netbios-dgm: NBT UDP PACKET(138)
13:13:51.168005 IP rungsted.mosek.intranet.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; UNICAST
13:13:51.168260 IP nyborg.mosek.intranet.netbios-ns > rungsted.mosek.intranet.netbios-ns: NBT UDP PACKET(137): QUERY; POSITIVE; RESPONSE; UNICAST
13:13:51.173059 IP hellerup.mosek.intranet.netbios-ns > 172.16.0.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
13:13:51.173115 IP nyborg.mosek.intranet.netbios-ns > hellerup.mosek.intranet.netbios-ns: NBT UDP PACKET(137): QUERY; POSITIVE; RESPONSE; UNICAST
13:13:51.174035 IP hellerup.mosek.intranet.netbios-dgm > 172.16.0.255.netbios-dgm: NBT UDP PACKET(138)
13:13:51.174091 IP nyborg.mosek.intranet.netbios-dgm > hellerup.mosek.intranet.netbios-dgm: NBT UDP PACKET(138)
13:13:51.174990 IP hellerup.mosek.intranet.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; UNICAST
13:13:51.175106 IP nyborg.mosek.intranet.netbios-ns > hellerup.mosek.intranet.netbios-ns: NBT UDP PACKET(137): QUERY; POSITIVE; RESPONSE; UNICAST
13:13:53.176582 IP lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns > nyborg.mosek.intranet.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST
13:13:53.176775 IP nyborg.mosek.intranet.netbios-ns > lyngby.mosek.intranet.0.16.172.in-addr.arpa.netbios-ns: NBT UDP PACKET(137): REGISTRATION; NEGATIVE; RESPONSE; UNICAST
13:13:53.957745 IP harbinger.mosek.intranet.17500 > 255.255.255.255.17500: UDP, length 208
13:13:53.958414 IP harbinger.mosek.intranet.17500 > 172.16.0.255.17500: UDP, length 208
0

It seems as if your Ubuntu machine has some firewall rules blocking incoming NTP traffic. Can you issue the command iptables -F and re-try synching the Windows machine?

3
  • no effect :( windows client still gets timeout or says the server in unreachable – Tomas Apr 10 '15 at 13:03
  • Ok. Let's use tcpdump -i any udp to capture the traffic between your ubuntu box and the windows machine, then report back what tcpdump sniffed. – shodanshok Apr 10 '15 at 13:10
  • I updated the question with the output of the command – Tomas Apr 14 '15 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.