Q. I'm using squid proxy server under CentOS Linux version 5. How to filter a particular MAC address under squid?
A. Not all operating system supports Mac address based filtering. For some operating systems. Squid calls these "ARP ACLs" and they are supported on Linux, Solaris, and BSD variants.
How do I set up ACL's based on MAC address?
Open squid.conf:
# vi /etc/squid/squid.conf
Local acl, section and append ACL as follows:
acl macf1 arp mac-address
acl macf2 arp 00:11:22:33:44:55
http_access allow macf1
http_access allow macf2
http_access deny all
Save and close the file. Restart squid server:
# /etc/init.d/squid restart
Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!
- Email FAQ to a friend
- Printable version
- Rss Feed
- Last Updated: 11-1-07

{ 8 comments… read them below or add one }
dear all
i tried to the above but still not able to control using mac
error:
2008/01/09 10:26:32| aclParseAclLine: Invalid ACL type ‘arp’
FATAL: Bungled squid.conf line 1882: acl ARP arp
Squid Cache (Version 2.5.STABLE14): Terminated abnormally.
please assist
web site is block but i want to open web site ony one ip address 192.168.3.1
what is acl rule in squid file in linux
you will have to recompile squid and make it before mac based filtering works.
add –enable-arp-acl to your original configure command in squid and run the following
% ./configure –enable-arp-acl …
% make clean
% make
then the above acls in squid.conf will work.
Hello,
First of all i would like to thanks for this site producers,how are doing great work.
I have learnt lot from here. Now I need help regarding MAC Address Filtering I have more then 100 user network i wants give the internet facility to only 30 user how can i do this?
dear i create 4 acl that is lab1, lab2, off, block_site & 1 is block.txt file. how to block 3 acl with 3 different block files in squid so that off access different block file its is possible plz reply me
Hi to all user with best wishes:
i using squid 2.6 STABLES18 and found the following error when tying to macaddress :
ERROR
aclParseAClline: invalid ACL type ‘arp’
FATA: Bungled squid.conf line 619: acl macaddress arp “/usr/local/squid/etc/macaddress”
squid cache (version 2.6 STABLE18): Terminated abnormally
kindly help
with best wishes to all
bashir – islamabad pakistan
Hello
How would I redirect the block mac address to a webpage ?
regards,
Thaabiet
I want to authenticate user of my network by his username password and MAC address for granting the internet access. Is it possible to do this ????? if yes how???