Pfsense - how to get a nice print out of static DHCP Mappings

Hi

I am looking for a nice way to print out the statics DHCP mappings that have been assigned. I have been using the DHCP Leases page but this is messy. I sure others would like this. Surprised this isn’t built into pfsense. Thanks in advance for any ideas (besides scraping the data myself) :wink:

You could write a script to go thru all 255 entries in your LAN and show those that are assigned.
(this checks the first 50 hosts in network 10.0.0.*)

i=0 ; IP=$(seq 1 50) ; DNS="@10.0.0.1"

echo
echo -e "\t ip        \t-> hostname "
echo '-----------------------------------'

for n in $IP; do
    A=10.0.0.${n}
    HOST=$(dig $DNS -x $A +short)
    if test -n "$HOST"; then
       echo -e "ok\t $A \t-> $HOST "
       ((i++))
    fi
done

echo ""
echo $i "hosts"

You could also just copy paste the page into Libre Office calc and it seems to do a decent job of formatting, it just need a little cleanup.

1 Like

As Tom said, just Copy & Paste it. Excel (o365) is doing a even better job, no real cleanup needed.

1 Like

Thanks All!

My simple solution was:

1 On to use the STATUS | DHCP leases page click on column to sort by - in my case IP Address. Then use the screen capture feature in the Firefox browser and then paste into a doc to print.