Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DHCP lease report?

In order to document the number of users on our network, I would like to have a report on the number of DHCP leases provided on a daily or monthly basis.
The data is listed in the “DHCP Server Log”, but no reporting tool to extract the information from it.

Is it possible to include this info in the “Executive Report”?
Or to extract it from the log files otherwise?


Jens Jakob, Dansk Centralbibliotek for Sydslesvig
UTM 9.112-12


This thread was automatically locked due to age.
  • Hi, Jens, and welcome to the User BB!

    Have you looked at the 'IPv4 Lease Table' tab in DHCP?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • I see no historical (or even current) lease data in the UTM 9.1 database - you'll likely need to work from dhcpd logs.

    Feature request for dhcpd reporting? UTM (Formerly ASG) Feature Requests: Hot (1739 ideas)
  • Hi Bob - and thanks.

    Yes I know the  'IPv4 Lease Table' tab, but you can't export the data, and have to count the leases manually every day.

    So I'll take the tip from teched, and send a featere request.

    / Jens Jakob
  • To show and count the IPs used in the last seven days, run, at the command line: /usr/local/bin/count_active_ip.plx --showcount

    In 'Logging & Reporting >> Network Usage', on the Bandwidth Usage tab, select a report on "Top Clients" for "Last 7 days" or other time frame.  Click on the spreadsheet icon to download as CSV. (Beforehand, go to the bottom of 'Report Settings' and set CSV to comma instead of semi-colon if needed.)

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Perhaps a really stupid question: Is there a way to access CLI from the web-interface? Or can I use putty?

    The CSV-file from Network Usage do provide a list of all used IP in a way, where they are easy to count. But unless the CLI script changes something, I can't see for how many leases an IP-address has been used.

    I might have to wait for the feature to be implemented by Sophos.

    / Jens Jakob
  • Configure and enable SSH access via WebAdmin then use the ssh client of your liking to access the UTM.

    From the command line the logs can be processed or sent off-UTM for processing on another host.

    This example counts the unique MAC addresses (based on a pattern) in eached gzipped log file in /varlog/dhcpd (requires root to access the archived logs):
    for LOGFILE in `find /var/log/dhcpd/ -name \*.log.gz | sort` ; do echo -n $LOGFILE\  ; zcat $LOGFILE | grep -o '[0-9a-f]\{2\}\(:[0-9a-f]\{2\}\)\{5\}' | sort -u | wc -l ; done


    Certainly much more than just that could be done and there is more than one way to do anything.
Share Feedback
×

Submitted a Tech Support Case lately from the Support Portal?