I doubt it as that isn't a valid dnsmasq configuration file. It looks like one from OpenWRT. Besides, Merlin already said the limit is within the driver.does it work with asuswrt-merlin firmware?
I doubt it as that isn't a valid dnsmasq configuration file. It looks like one from OpenWRT. Besides, Merlin already said the limit is within the driver.
No. I tried, and it didn't work, probably because of a hardcoded limit within the wireless driver.
For such needs, you'll want a more advanced product with Radius-based security.i see.. any suggest which can handle hundred of device to access internet on allowed list ? instead of mac address? @RMerlin @ColinTaylor
### ipset initialization, valid for all the restrictions:
modprobe xt_set # load set if not already # Necessary to provide match-set extension.
ipset create IpToMac_S bitmap:ip,mac range 192.168.1.0/24 #create the set, for 24-bit IP address common prefix
ipset add IpToMac_S 192.168.1.2,00:16:6F:5F:00:00 #AnaTosh
ipset add IpToMac_S 192.168.1.3,CC:73:14:06:00:00 #AnaX6
ipset add IpToMac_S 192.168.1.8,00:1F:3B:B0:00:00 #JjHp2
# Insert in main FORWARD chain a rejecting rule for clients not matching previous IpToMac_S set:
iptables -I FORWARD -i br0 -m set ! --match-set IpToMac_S src,src -j REJECT # or jump to another chain, if you want to add a special treatment.
My "Juglar Parental Control", includes a:
Timed-Releasable IP-MAC client white list
(I don't know how to link my post here, but you can find it by searching for that exact phrase in this forum).
From its included code (in the firewall-start user script) , you can extract the idea to implement just the white list of IP-MAC pairs for the whole LAN (not just the WIFI LAN).
It requires that each client is assigned a unique pre-defined IP adrs. You can achieve it with "Manually Assigned IP around the DHCP list (Max Limit : 128)", in the webui / LAN page, and, the rest over 128, by manually configuring each assigned IP to them, if they allow it.
It uses ipsets (fast to process), within iptables, and it could hold thousands of IP-MAC address pairs (clients) .
For example, I extract a sample here with three clients:
Code:### ipset initialization, valid for all the restrictions: modprobe xt_set # load set if not already # Necessary to provide match-set extension. ipset create IpToMac_S bitmap:ip,mac range 192.168.1.0/24 #create the set, for 24-bit IP address common prefix ipset add IpToMac_S 192.168.1.2,00:16:6F:5F:00:00 #AnaTosh ipset add IpToMac_S 192.168.1.3,CC:73:14:06:00:00 #AnaX6 ipset add IpToMac_S 192.168.1.8,00:1F:3B:B0:00:00 #JjHp2 # Insert in main FORWARD chain a rejecting rule for clients not matching previous IpToMac_S set: iptables -I FORWARD -i br0 -m set ! --match-set IpToMac_S src,src -j REJECT # or jump to another chain, if you want to add a special treatment.
You should adjust the IP address common prefix (/24) to your needs.
It doesn't block them from accessing the WIFI but it does block them from accessing internet, which could be dissuassive enough.
Could it be useful to you?
@Juglar I need to test this method soon.. how many this method limited to 128 devices or more than 128 devices?
For such needs, you'll want a more advanced product with Radius-based security.
The ipset allows up to about 65 thousand. I suppose other aspects will limit before that, and at least your patience configuring the clients !
@Juglar what i type for list down of that? is it “ipset list”? and how to remove all list after i added to list?
if using VPN/Proxy? will not work?
modprobe xt_set
modprobe: module xt_set not found in modules.dep
ipset v4.5: Couldn't load settype `bitmap:ip,mac':File not found
@Juglar im running ac66u but giving error:
Code:modprobe: module xt_set not found in modules.dep ipset v4.5: Couldn't load settype `bitmap:ip,mac':File not found
ipset --create IpToMac_S macipmap --network 192.168.1.0/24 #create the set, for 24-bit IP address common prefix
ipset --add IpToMac_S 192.168.1.2,00:16:6F:5F:00:00 #AnaTosh
ipset --add IpToMac_S 192.168.1.3,CC:73:14:06:00:00 #AnaX6
ipset --add IpToMac_S 192.168.1.8,00:1F:3B:B0:00:00 #JjHp2
# Insert in main FORWARD chain a rejecting rule for clients not matching previous IpToMac_S set:
iptables -I FORWARD -i br0 -m set ! --match-set IpToMac_S src,src -j REJECT # or jump to another chain, if you want to add a special treatment.
@Juglar i found the solution for ipset v4.5 & iptables 1.4 for old router like ac66u or n66u:
Code:ipset --create IpToMac_S macipmap --network 192.168.1.0/24 #create the set, for 24-bit IP address common prefix ipset --add IpToMac_S 192.168.1.2,00:16:6F:5F:00:00 #AnaTosh ipset --add IpToMac_S 192.168.1.3,CC:73:14:06:00:00 #AnaX6 ipset --add IpToMac_S 192.168.1.8,00:1F:3B:B0:00:00 #JjHp2 # Insert in main FORWARD chain a rejecting rule for clients not matching previous IpToMac_S set: iptables -I FORWARD -i br0 -m set ! --match-set IpToMac_S src,src -j REJECT # or jump to another chain, if you want to add a special treatment.
dont need to add "modprobe xt_set".
around 400+ devices.@alienx2
Ok. I'm not sure of the syntax for first line, but glad that you have found the solution and thanks for sharing.
So, does it serve you for your purpose? How many MACs can you filter ?
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!