Script for MAC whitelist/static ips

Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Author Message
chiefwigms
DD-WRT Novice


Joined: 30 May 2007
Posts: 27

PostPosted: Wed Jun 22, 2022 15:35    Post subject: Script for MAC whitelist/static ips Reply with quote
Did a little searching and looked at the Wiki for scripts, but didn't find anything...

Anyone have a script that can read a text/csv on boot from usb/jffs2 and auto populate a MAC white list (and any any static reservations)?
i.e.
Hostname,MAC,IPAddress(optional),Comment(optional)?

Having added several wifi devices, it'd be nice to not have to manange backup/restore of static_leases any time I upgrade firmware, and nice to have known host names for any active clients under the Lan status page (most are *).
Sponsor
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1899

PostPosted: Wed Jun 22, 2022 16:06    Post subject: Reply with quote
To show your MAC whitelist (MAC filter list on wifi):
nvram show | grep (interfacename)_maclist

I also noticed a filter_maclist variable, which I believe applies to WAN access filter.

In regards to static leases, most have adopted using the additional dnsmasq settings text box to add them via copy/paste:

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=332320

I guess it specifically depends on how much nvram usage you have, whether a reset is required or not. There are only specific nvram variables to worry about if a reset is actually warranted during troubleshooting.

_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
chiefwigms
DD-WRT Novice


Joined: 30 May 2007
Posts: 27

PostPosted: Thu Jun 23, 2022 3:05    Post subject: Reply with quote
dale_gribble39 wrote:
To show your MAC whitelist (MAC filter list on wifi):
nvram show | grep (interfacename)_maclist

I also noticed a filter_maclist variable, which I believe applies to WAN access filter.

In regards to static leases, most have adopted using the additional dnsmasq settings text box to add them via copy/paste:

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=332320

I guess it specifically depends on how much nvram usage you have, whether a reset is required or not. There are only specific nvram variables to worry about if a reset is actually warranted during troubleshooting.


As the title says, I'm looking for a script. I know how to set static IPS manually and have a MAC address whitelist. It'd be nice to have a single source to populate all this...
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum