Automatically Sync DHCP Leases to Dumb Access Points

Hi everyone,

I want to share a solution I recently developed that allows both the MAC address and hostname to be displayed under "Associated Stations" on dumb access points, similar to the way the main router does this. This way, you can easily identify which devices are connected to each access point. The solution involves automatically syncing DHCP leases data from the main router to multiple dumb access points.

Use case:

  • A main router
  • One or more dumb access points (that only handle WiFi)

Here's the step-by-step solution:

  1. Generate SSH Key Pair:
  • On the main router, run the following command to generate an SSH key pair:
dropbearkey -t ed25519 -f /etc/dropbear/private_key -y /etc/dropbear/public_key
  • Ensure the private key has the correct permissions:
chmod 600 /etc/dropbear/private_key
  1. Copy Public Key to Access Points:
  • Append the contents of the public key file (/etc/dropbear/public_key) to the /etc/dropbear/authorized_keys file on each dumb access point. This enables passwordless SSH access from the main router to the access points.
  1. Create Sync Script:
  • Create a shell script file, for example,, on the main router with the following content:

# List of access points to sync with

# Path to the dhcp.leases file on the main router

# Destination directory on the access points

# Path to the SSH private key

# Loop through each access point and copy the dhcp.leases file
for access_point in $access_points; do
    scp -i "$ssh_private_key" "$dhcp_leases_file" "root@$access_point:$destination_dir"
  • Save the script and make it executable:
chmod +x
  1. Schedule Script Execution:
  • Open the crontab for editing:
crontab -e
  • Add the following line to run the script every half hour:
*/30 * * * * /path/to/
  • Save and close the crontab file.

Remember to adjust the paths and IP addresses in the script to match your setup and append ' /path/to/' to '/etc/sysupgrade.conf' so it is preserved during an upgrade and in your backup archive.

With these steps in place, the script will automatically sync the DHCP leases data from the main router to the specified dumb access points. You will be able to see both the MAC address and hostname under "Associated Stations" on the access points, making it convenient to identify connected devices.

Please feel free to ask any questions or share your experiences with this solution!


You should add this to the Wiki, users inquire about this often.

Good idea lleachii, I asked the wiki admins to create a wiki account for me.


On reviewing the wiki I discovered that other solutions have already been posted here, one of which is very similar to my approach but simpler in that it uses a oneliner cron job.

You can find links to the posts here:
Populate Host Names in Associated Stations