Hi Michel,

On 12 Aug 2019, at 13:54, dy1977--- via Unbound-users 
<[email protected]> wrote:

> I highly appreciated the flexibility given by python scripts in Unbound. 
> Since I want to take decisions based on user, I used the code given in the 
> examples to get the IP address of the sender. No problem. But what I would 
> really need is the MAC address. I have not found anything about that in 
> Google or by exploring the code of Unbound.
> 
> Is there any possibility to get the MAC address in the python scripts ? Or 
> will I have to patch the code of Unbound ? In this last case, if anyone knows 
> where in the code I should investigate, or even better propose the code, I 
> would highly appreciate.

In order to get the MAC address corresponding to a particular layer-3 address 
you will need to consult the ARP table (IPv4) or NDP/SEND tables (IPv6) on a 
device attached to the same subnet as the device with that IP address. This is 
not a restriction of unbound, but rather just how IP works.

In the case of a home gateway that might be the same device as is running 
unbound, but in other cases (e.g. where an unbound instance is used by devices 
spread over a more elaborate network topology) it might not be.


Joe

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to