Listing all devices in WebGui incl. static ips?

Hi all,
I started using OpenWrt yesterday and am wondering if there is a way to see all connected devices in the web interface, even those that have a static ip setup and are not having one assigned by the dhcp server?


Status-> Routes-> Read the ARP table.
Also at the bottom of the page are the IPv6 Neighbours.

1 Like

Thanks, a nice pretty overview like the dhcp leases would be better, but that will do the job.

Use ip -s -s neigh flush all to get the correct active position as the ARP table will contain
non-active ip addresses.


You could use this useful info

ip -s -s neigh flush all

from @azeu666 and write a simple bash cgi listing all you need, locate it in /www/cgi-bin/your.cgi modify the original /www/index.html inserting a link to your cgi and first of all let sh to read cgi in /etc/config/uhttp of course if you will write your cgi in lua, uhttpd config is already ok.

The simplest cgi in sh:


cat << EOT

<!DOCTYPE html>
        <title>webserver </title>
        <link rel="stylesheet" type="text/css" href="/style.css" />
<body style="background-color: white">
<!-- Header -->
<div id="header">
<!-- Content -->
<div id="content">

for IP in $(ip -s neigh | sed -e s'/ /-/'g | tr '\n'); do
echo "$IP<br><br>"; done

cat << EOT

<!-- End content -->


exit 0

Don't forget to add

list interpreter ".cgi=/bin/sh"

In your uhttp config file

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.