Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom MAC range vendors #169

Open
mattheys opened this issue Jan 21, 2025 · 2 comments
Open

Add custom MAC range vendors #169

mattheys opened this issue Jan 21, 2025 · 2 comments

Comments

@mattheys
Copy link

Relating to #38

Can we have a config option to add a known range of MAC addresses to a vendor via Environment variable or something?

I would like all my Proxmox hosts that start BC:24:11 to show as Proxmox, however Proxmox also let's you define your own Mac prefix so this might not be the same for everyone, hence a configurable setting to be able to add an array of maps.

It would be nice to change all the (Unknown)'s into something I would recognise, especially in a test lab where you are spinning up stuff and destroying it quite a lot.

I think this is coming from an external tool but if it's possible to add in an override for these config options it would be really handy.

Thanks

@pedroash
Copy link

pedroash commented Feb 4, 2025

I think I've found a solution

  1. map a volume to /etc/arp-scan e.g. /docker_stacks/watchyourlan/_data/arp-scan:/etc/arp-scan
  2. edit/create a file named mac-vendor.txt in the 'arp-scan' folder with vi or nano e.g. 'vi mac-vendor.txt'
  3. add mac address vendor / vendor name (mac address needs to be all uppercase) and must be seperated by a tab e.g. 'BC2411 ProxmoxVE' and save
  4. delete the old database from /data/WatchYourLAN and restart the docker container or manaully delete existing enteries one by one in the gui
  5. you should now see the updated mac vendor details

@zepab
Copy link

zepab commented Mar 1, 2025

well 'BC2411 ProxmoxVE' is already part of the standard ieee mapping
the ieee mapping is almost changing every days
either because a firm has changed a typo in their name of because of range owner ship has changed...

I created that script to directly update the default ieee-oui mapping used :
which allow me to get less unknown things.
issue is that once a device is known the mapping is not updated, I will need to check to code for this.
cat update.sh

wget -O /tmp/oui.csv  "http://standards-oui.ieee.org/oui/oui.csv"
wget -O /tmp/cid.csv "http://standards-oui.ieee.org/cid/cid.csv"
wget -O /tmp/iab.csv "http://standards-oui.ieee.org/iab/iab.csv"
wget -O /tmp/mam.csv "http://standards-oui.ieee.org/oui28/mam.csv"
wget -O /tmp/oui36.csv "http://standards-oui.ieee.org/oui36/oui36.csv"

>/usr/share/arp-scan/ieee-oui.txt
for file in iab.csv oui36.csv oui.csv cid.csv mam.csv
do
   #will not be complete for column which do include , into "strings"
   echo "#from $file" >>/usr/share/arp-scan/ieee-oui.txt
   cat /tmp/$file | grep -v Registry | awk -F ',' '{print $2 "\t" $3}' >>/usr/share/arp-scan/ieee-oui.txt 
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants