how to uniquely store leased mac address to a file
Dear all,
I am running dhcpd, how to uniquely store leased mac address to a file (list_mac)? please help thanks |
a leased mac address?? you don't lease mac addresses, this makes no sense.
|
oops, sorry what I meant is the mac address of leased ip? ..
any idea? please help thanks & regards |
Can you explain the purpose for doing this? It sounds like this may be a kludge (and a better solution could exist).
You can check your arp cache to see if contains the IP/MAC addresses you need. If you're looking to monitor IP/MAC pairs, then use arpwatch. |
Hello,
I am just want to log all mac address of leased ip to a file (list_mac) and after that I would do checking into iptables based on that file (see below) MAC_LIST=`cat /home/itdept/list_macs` for i in $MAC_LIST; do iptables -A INPUT -i eth0 -m mac --mac-source $i -j ACCEPT done iptables -A INPUT -i eth0 -j REJECT any suggestion? Thanks & Regards Winanjaya |
well on your dhcp server just read the dhcp.leases file.
|
All times are GMT -5. The time now is 06:26 AM. |