?
Solved

to retrive list of ntp clients accesing NTP servers

Posted on 2014-01-28
2
Medium Priority
?
475 Views
Last Modified: 2014-01-30
Hi All,

I want to retrieve list of all clients accessing my ntp servers like there IP and hostname for inventory - please help me with that.
0
Comment
Question by:apunkabollywood
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
Daniel Helgenberger earned 2000 total points
ID: 39815209
Hello apunkabollywood,

I do not know if it is possible to log ntpd access, but of course iptables can do so; I think this is one of the easiest ways:
Create a rule for 123/udp on your NTP server, like this:
iptables -A INPUT -p udp -s 0.0.0.0/0 --dport 123 -j LOG --log-level 6 --log-prefix='ntpaccess'

Open in new window


Note, these might be logged to your kernel.log depenting on your distro. You might want to change the location to your liking with rsyslog like this:
$ cat /etc/rsyslog.d/ntpdaccess
:msg,contains,"ntpaccess" /var/log/ntpdaccess.log

Open in new window

Restart rsyslog after changing configs.

Note: this should work on any normal commonly modern linux (Debian Lenny+, Ubuntu 12+, RHEL/CentOS 6, Fedora 14+, ect.)
0
 
LVL 30

Expert Comment

by:serialband
ID: 39815967
It might be in your /var/log/syslog, but it depends on your configuration.

http://serverfault.com/questions/359835/where-are-the-ntpd-log-file-located-and-how-can-we-configure-the-ntpd-log-file

You can read up on how to configure NTP here:  http://support.ntp.org/bin/view/Support/ConfiguringNTP

You can even set up access restrictions.
http://support.ntp.org/bin/view/Support/AccessRestrictions
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will giveā€¦
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question