Sponsored Content
Top Forums UNIX for Advanced & Expert Users Let NTP listen only on one interface Post 302180793 by one71 on Tuesday 1st of April 2008 06:53:59 AM
Old 04-01-2008
Let NTP listen only on one interface

Hallo,

I have a machine which serves as NTP server. This machine has more (3) Network interfaces (+ loopback). By default NTP "binds" itself to all available interfaces, i.e. it listens on port 123 on all interfaces:

Code:
netstat -an|grep 123
udp        0      0  127.0.0.1.123          *.*
udp        0      0  1.2.3.4.123           *.*
udp        0      0  *.123                  *.*
udp        0      0  1.2.5.4.123           *.*
udp        0      0  1.2.6.4.123          *.*

I would like to "bind" NTP to only one interface, say the 1.2.3.4. Is it possible? I do not find any hint on the net.

Thanks.

p.s. I am interested in a solution for linux and HP-UX, in case of OS dependency.
 

9 More Discussions You Might Find Interesting

1. Solaris

ntp server and ntp client

All, How do you set a Solaris 9 server which received ntp updates from a ntp server to broadcast them on a local subnet. I have created a /etc/inet/ntp.conf file to receive the updates from a server on network and need to make this server become like a ntp relay from the main server. Any... (1 Reply)
Discussion started by: bubba112557
1 Replies

2. UNIX for Dummies Questions & Answers

listen to ports...

Hi all, How can I log all requests on ports for programs like ftp, telnet, rsh, xdmcp etc... I want to see if anyone uses these programs/protocols and how often. Is it difficult to setup a log for these ports and listen on all requests? /combat (4 Replies)
Discussion started by: tonlu
4 Replies

3. Solaris

Command line Interface or GUI Interface not shown on solaris

Dear all, I am a newbie in solaris and I need your advice. I have a Solaris version 5.9 installed on Sunfire V240. I am able to ssh the machine from putty remotely. My problem is that I cannot see the display from KVM switch I have connected to it. I need also to be able to see the GUI... (2 Replies)
Discussion started by: mbouster
2 Replies

4. SCO

Change SCO - GUI or Desktop interface to DOS based interface

Hi all I have installed a demo version of SCO OpenServer 5.0.2, I finally found it is Desktop Interface, I would like to know how to change its interface to dos based interface? If you have any ideas, please tell me then. Thank you (2 Replies)
Discussion started by: TinhNhi
2 Replies

5. Linux

How often does Linux NTP server update its time with the external NTP server?

All here, thank you for listening. Now I've set up a Linux NTP server by adding a external windows NTP server in /etc/ntp.conf. Then I start the ntpd daemon. But how often does the Linux NTP server update its time with the external NTP server? I've looked up everywhere but found no information... (1 Reply)
Discussion started by: MichaelLi
1 Replies

6. HP-UX

Setting up NTP HP-UX clients from solaris NTP server

Hi I wonder if its possible to setup NTP clients running HP-UX o.s. from a solaris 10 NTP server? FR (3 Replies)
Discussion started by: fretagi
3 Replies

7. Solaris

Listen given port

Good morning! I would like to test a particular port in Solaris, to see if the firewall rules are ok. Should I install an application, but as yet I have not, have to force solaris to keep an open door, and put any application listening to port 1099, and will test a terminal connectivity via... (5 Replies)
Discussion started by: poyato
5 Replies

8. HP-UX

What is the Listen Address of my process ?

Hi, We cant set the listen address of my java process to the IP address or any of the DNS names listen in the hosts file of the server. We can access the resources of the pid in the web browser through http://<IP / DNS>:port/console Based on the pid, how can we find what is the listen... (6 Replies)
Discussion started by: mohtashims
6 Replies

9. Red Hat

Ntp client sync with local over ntp server

Hi, I have two ntp servers in my cluster and I want all the nodes in my cluster to sync with either of the ntp servers or just one. Unfortunately it keep rotating the sync, between my ntp server 1, ntp server 2 and local. Is there anyway I can change the sync to avoid local? # ntpq -p ... (3 Replies)
Discussion started by: pjeedu2247
3 Replies
ntp_time(3tcl)						      Network Time Facilities						    ntp_time(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
ntp_time - Tcl Time Service Client SYNOPSIS
package require Tcl 8.0 package require time ?1.2.1? ::time::gettime ?options? timeserver ?port? ::time::getsntp ?options? timeserver ?port? ::time::configure ?options? ::time::cget name ::time::unixtime token ::time::status token ::time::error token ::time::reset token ?reason? ::time::wait token ::time::cleanup token _________________________________________________________________ DESCRIPTION
This package implements a client for the RFC 868 TIME protocol (http://www.rfc-editor.org/rfc/rfc868.txt) and also a minimal client for the RFC 2030 Simple Network Time Protocol (http://www.rfc-editor.org/rfc/rfc2030.txt). RFC 868 returns the time in seconds since 1 January 1900 to either tcp or udp clients. RFC 2030 also gives this time but also provides a fractional part which is not used in this client. COMMANDS
::time::gettime ?options? timeserver ?port? Get the time from timeserver. You may specify any of the options listed for the configure command here. This command returns a token which must then be used with the remaining commands in this package. Once you have finished, you should use cleanup to release all resources. The default port is 37. ::time::getsntp ?options? timeserver ?port? Get the time from an SNTP server. This accepts exactly the same arguments as ::time::gettime except that the default port is 123. The result is a token as per ::time::gettime and should be handled in the same way. Note that it is unlikely that any SNTP server will reply using tcp so you will require the tcludp or the ceptcl package. If a suit- able package can be loaded then the udp protocol will be used by default. ::time::configure ?options? Called with no arguments this command returns all the current configuration options and values. Otherwise it should be called with pairs of option name and value. -protocol number Set the default network protocol. This defaults to udp if the tcludp package is available. Otherwise it will use tcp. -port number Set the default port to use. RFC 868 uses port 37, RFC 2030 uses port 123. -timeout number Set the default timeout value in milliseconds. The default is 10 seconds. -command number Set a command procedure to be run when a reply is received. The procedure is called with the time token appended to the argu- ment list. -loglevel number Set the logging level. The default is 'warning'. ::time::cget name Get the current value for the named configuration option. ::time::unixtime token Format the returned time for the unix epoch. RFC 868 time defines time 0 as 1 Jan 1900, while unix time defines time 0 as 1 Jan 1970. This command converts the reply to unix time. ::time::status token Returns the status flag. For a successfully completed query this will be ok. May be error or timeout or eof. See also ::time::error ::time::error token Returns the error message provided for requests whose status is error. If there is no error message then an empty string is returned. ::time::reset token ?reason? Reset or cancel the query optionally specfying the reason to record for the error command. ::time::wait token Wait for a query to complete and return the status upon completion. ::time::cleanup token Remove all state variables associated with the request. % set tok [::time::gettime ntp2a.mcc.ac.uk] % set t [::time::unixtime $tok] % ::time::cleanup $tok % set tok [::time::getsntp pool.ntp.org] % set t [::time::unixtime $tok] % ::time::cleanup $tok proc on_time {token} { if {[time::status $token] eq "ok"} { puts [clock format [time::unixtime $token]] } else { puts [time::error $token] } time::cleanup $token } time::getsntp -command on_time pool.ntp.org AUTHORS
Pat Thoyts BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category ntp of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. SEE ALSO
ntp KEYWORDS
NTP, SNTP, rfc 2030, rfc 868, time CATEGORY
Networking COPYRIGHT
Copyright (c) 2002, Pat Thoyts <patthoyts@users.sourceforge.net> ntp 1.2.1 ntp_time(3tcl)
All times are GMT -4. The time now is 09:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy