Re: [Dnsmasq-discuss] DHCP range for "private" Wi-Fi addresses

2025-01-03 Thread Buck Horn via Dnsmasq-discuss

On 03.01.25 16:06, Nick Kirsch wrote:

Neither set nor tag worked alone or in both positions. Anyway to verify the
expression is being matched?


Your MAC pattern seems incorrect, e.g.

> dhcp-host=*:0E:*:*:*:*,set:private_wifi

won't match

> DHCPREQUEST(lan0) 192.168.10.189 0e:00:12:69:fe:61


You could try e.g.

dhcp-host=0E:*:*:*:*:*,set:private_wifi


However, that won't match all locally administered MACs (i.e. with the
U/L bit set).

As dhcp-host wildcards for h/w addresses would match byte-wise, you'd
have to add all 16 definitions per nibble (e.g. all of 0E:*:*:*:*:*,
1E..., 2E... up to FE:*:*:*:*:*) to correctly *set:* your private_wifi
tag for randomised MACs (provided their host OS actually sets that U/L
bit), and *tag:* the the range you want to select for those MACs.



But I wonder why you'd have to deal with randomised MAC addresses at all.
Is there a reason why you won't simply disable MAC address randomisation
on your devices for your wifi home network?

Wife, kids, visitors... ;)



Then I'd recommend to opt for a dedicated guest network and educating
family members.

Many routers allow configuration of a guest wifi that your visitors
could use.
For legit users of your home network, disabling MAC address
randomisation on a client for your specific wifi is  a one time job.


Reconsidering your choice is entirely up to you, but don't say I didn't
tell you if you may find out only later that analysing device-specific
issues will be harder when device IP addresses are changing over time
(which dnsmasq is usually good at avoiding for a given MAC, but
randomising MACs will nullify that benefit). ;)


Kind regards,
    Buck




___
Dnsmasq-discuss mailing list
[email protected]
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] DHCP range for "private" Wi-Fi addresses

2025-01-03 Thread Nick Kirsch
Thanks!


> I guess you should use tag instead of set above - quoting from dnsmasq's
> documentation
>

dhcp-host=*:02:*:*:*:*,set:private_wifi
dhcp-host=*:06:*:*:*:*,set:private_wifi
dhcp-host=*:0A:*:*:*:*,set:private_wifi
dhcp-host=*:0E:*:*:*:*,set:private_wifi
dhcp-range=tag:private_wifi,192.168.20.100,192.168.20.200

Neither set nor tag worked alone or in both positions. Anyway to verify the
expression is being matched?


> But I wonder why you'd have to deal with randomised MAC addresses at all.
> Is there a reason why you won't simply disable MAC address randomisation
> on your devices for your wifi home network?
>

Wife, kids, visitors... ;)

Nick
___
Dnsmasq-discuss mailing list
[email protected]
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] DHCP range for "private" Wi-Fi addresses

2025-01-01 Thread Buck Horn via Dnsmasq-discuss

On 02.01.25 02:13, Nick Kirsch wrote:

I'm interested in seeing if I can assign all of the "private" W-Fi mac
addresses (found enabled on Apple devices) to a different IP range on my
network, while the rest of the DHCP traffic goes to the "public" range.

I took a guess at the syntax:

dhcp-range=set:private_wifi,192.168.20.100,192.168.20.200,255.255.255.0,12h


I guess you should use tag instead of set above - quoting from dnsmasq's
documentation
> Note that for --dhcp-range both tag: and set: are allowed,
> to both select the range in use based on (eg) --dhcp-host, and
> to affect the options sent, based on the range selected.

But I wonder why you'd have to deal with randomised MAC addresses at all.
Is there a reason why you won't simply disable MAC address randomisation
on your devices for your wifi home network?

Kind regards,
    Buck



___
Dnsmasq-discuss mailing list
[email protected]
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] DHCP range for "private" Wi-Fi addresses

2025-01-01 Thread Nick Kirsch
Hi All,

Happy New Year!

I'm (today) a brand new user of dnsmasq (transitioning from dhcpd/bind) and
/loving/ it!

I'm interested in seeing if I can assign all of the "private" W-Fi mac
addresses (found enabled on Apple devices) to a different IP range on my
network, while the rest of the DHCP traffic goes to the "public" range.

I took a guess at the syntax:

dhcp-range=set:private_wifi,192.168.20.100,192.168.20.200,255.255.255.0,12h
dhcp-host=*:02:*:*:*:*,set:private_wifi
dhcp-host=*:06:*:*:*:*,set:private_wifi
dhcp-host=*:0A:*:*:*:*,set:private_wifi
dhcp-host=*:0E:*:*:*:*,set:private_wifi
dhcp-range=192.168.10.10,192.168.10.250,12h

However, it isn't working:

% journalctl -xeu dnsmasq.service -f | grep --line-buffered 0e:00

Jan 02 01:10:08 new-router dnsmasq-dhcp[10107]: 3820859244
DHCPREQUEST(lan0) 192.168.10.189 0e:00:12:69:fe:61
Jan 02 01:10:08 new-router dnsmasq-dhcp[10107]: 3820859244 DHCPACK(lan0)
192.168.10.189 0e:00:12:69:fe:61

If this isn't possible, what's the best location in the source to start
poking around?

Thanks!

Nick
___
Dnsmasq-discuss mailing list
[email protected]
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss