Page 1 of 1

MAC Allow With Bind Ip

Posted: Tue Jul 17, 2007 6:52 pm
by zeeshan84
First of Creat new file


and edit follwing Steps

Use the following command to bind the mac address with IP address;

/sbin/iptables -A INPUT -i eth0 -s -p all -m mac --mac-source ff:ff:ff:ff:ff:ff -j

At the end of all mac and IP enteries insert the following line in your script file;

/sbin/iptables -A INPUT -i eth0 -j DROP

To run script just type "sh /"


if you want to run this script at startup use this command once;

echo "sh /" >> /etc/rc.local

Posted: Tue Jul 17, 2007 7:08 pm
by lambda
there are several scripts on this site about limiting access by ethernet addresses. please use one of them instead of this one.

Posted: Tue Jul 17, 2007 7:30 pm
by zeeshan84
ok dear i will try

Posted: Wed Jul 18, 2007 5:14 am
by mudasir

You can use the script made by Farrukh Bhai, it is much easire.
I have personally used it, it works great.