ntpd not listening on port 123

  • Follow


Hi,

I have ntpd (4.2.0-a) setup on my gateway server (FreeBSD 5.3) :

$ cat /etc/ntp.conf
server canon.inria.fr prefer
server chronos.cru.fr

driftfile /var/db/ntp.drift

restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap

The server synchronisation works great but ntpd is not listening on port 123 :
$ netstat -an -p tcp | grep LISTEN
doesn't show me something listening on 123
$ telnet 192.168.0.1 123
doesn't work

Did I missed something ?

Thanks
0
Reply supernico 1/6/2005 9:37:33 PM

On 2005-01-06, Supernico <supernico@gmail.com> wrote:

>The server synchronisation works great but ntpd is not listening on port 123 :
>
>$ netstat -an -p tcp | grep LISTEN
>
>doesn't show me something listening on 123

That's because NTP uses port 123/UDP.

-- 
Steve Kostecke <kostecke@ntp.isc.org>
NTP Public Services Project - http://ntp.isc.org/
0
Reply Steve 1/6/2005 10:19:56 PM


Supernico wrote:

>Hi,
>
>I have ntpd (4.2.0-a) setup on my gateway server (FreeBSD 5.3) :
>
>$ cat /etc/ntp.conf
>server canon.inria.fr prefer
>server chronos.cru.fr
>
>driftfile /var/db/ntp.drift
>
>restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap
>
>The server synchronisation works great but ntpd is not listening on port 123 :
>$ netstat -an -p tcp | grep LISTEN
>doesn't show me something listening on 123
>$ telnet 192.168.0.1 123
>doesn't work
>
>Did I missed something ?
>
>Thanks
>  
>
Yes, you missed something!!   NTP uses UDP not TCP.  You may have missed 
something else as well since my Solaris system does not show anything 
listening on port 123 either.  My Unix/network skills are not yet good 
enough to explain why not but ntpd is clearly working so I'm not worried 
about it.
0
Reply Richard 1/6/2005 10:20:13 PM

In article <uN2dna5YVe8AJEDcRVn-2w@comcast.com> "Richard B. Gilbert"
<rgilbert88@comcast.net> writes:

>Yes, you missed something!!   NTP uses UDP not TCP.  You may have missed 
>something else as well since my Solaris system does not show anything 
>listening on port 123 either.  My Unix/network skills are not yet good 
>enough to explain why not but ntpd is clearly working so I'm not worried 
>about it.

It's just that LISTEN is basically a TCP state - UDP sockets aren't
generally considered to have such a state, and so an "UDP listener"
doesn't show up as LISTEN. From a Solaris 8 box:

$ netstat -an | grep 123
      *.123                                 Idle
127.0.0.1.123                               Idle
10.0.0.30.123                               Idle
      *.123                                 Idle

(There is an "UDP: IPv4" header that the grep takes out.)

FreeBSD 5.3:

$ netstat -an | grep 123
udp4       0      0  127.0.0.1.123          *.*                    
udp4       0      0  10.1.1.1.123           *.*                    
udp4       0      0  *.123                  *.*                    


--Per Hedeland
per@hedeland.org
0
Reply per 1/7/2005 10:36:06 AM

3 Replies
908 Views

(page loaded in 0.069 seconds)

Similiar Articles:













7/23/2012 8:56:41 AM


Reply: