Squid Proxy Server Mac Address based filtering

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!

{ 8 comments… read them below or add one }

1 Justus 01.09.08 at 7:36 am

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

2 pradeep 03.12.08 at 4:03 am

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

3 vikas kashikar 06.18.08 at 6:32 am

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.

4 Kamran Rashid 07.12.08 at 4:46 am

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?

5 Gurpreet 10.14.08 at 6:19 am

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

6 bashir 12.24.08 at 3:58 am

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

7 thaabiet 02.01.09 at 8:54 pm

Hello

How would I redirect the block mac address to a webpage ?

regards,
Thaabiet

8 sameer kale 04.05.09 at 8:17 am

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???

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tagged as: , , , , , , ,

Previous post: Squid proxy authentication in transparent mode

Next post: How to: Allow telnet and ssh through iptables under Linux