how to reject connections which come from unknown mac address?
Dear All,
I have a file (list_macs) that contains list of mac addresses, how to reject connections which come from unknown mac address? please help thanks & regards Winanjaya |
use iptables for that.
|
Assuming that list_macs contains one MAC address per line (and nothing else), here's an example:
Code:
MAC_LIST=`cat /etc/list_macs` |
Hi..
but how to store it into /etc/sysconfig/iptables ? please advise thanks & regards Winanjaya |
Quote:
Code:
service iptables save Code:
iptables-save > /etc/sysconfig/iptables |
Can I use "deny unknown-clients" options in /etc/dhcpd.conf for this? .. I meant I don;t want my dhcp server give IP to unknown clients
deny unknown-clients; option domain-name-servers 172.16.1.3; default-lease-time 600; max-lease-time 7200; ... ... ... host appio-wireless { hardware ethernet 00:90:4B:6D:97:59 ; } host appio-wired { hardware ethernet 00:90:3D:93:AD:3E ; } please help thanks & regards Winanjaya |
If you're using ISC DHCP, iptables wouldn't work anyways since ISC DHCP uses a RAW socket. At least, that's how it worked last time I used ISC DHCP. Someone please correct me if things have changed. And yes, it's very common to specify in dhcpd.conf the MACs you wish to provide service to. Keep in mind that MACs are easily sniffed/spoofed, though.
|
All times are GMT -5. The time now is 08:23 AM. |