9.04.2009
virtualizing with xen
9.03.2009
yum behind proxy in RHEL5
8.14.2009
create rpm squid supporting mac
Ahora compilaremos un fuente de squid (.src.rpm) para poder hacer acls por mac address, necesitaremos tener los fuentes de squid para RHEL 5 squid-2.6.STABLE6-5.el5_1.3.src.rpm. Prepararemos el rpm con :
#rpm -ivh squid-2.6.STABLE6-5.el5_1.3.src.rpm
#updatedb
#vi /usr/src/redhat/SPECS/squid.spec
Luego en el spec, agregamos --enable-arp y --enable-arp-acl y deberiamos tener algo asi como :
%configure \
--exec_prefix=/usr \
--bindir=%{_sbindir} \
--libexecdir=%{_libdir}/squid \
--localstatedir=/var \
--datadir=%{_datadir} \
--sysconfdir=/etc/squid \
--enable-epoll \
--enable-snmp \
--enable-removal-policies="heap,lru" \
--enable-storeio="aufs,coss,diskd,null,ufs" \
--enable-ssl \
--with-openssl=/usr/kerberos \
--enable-delay-pools \
--enable-linux-netfilter \
--with-pthreads \
--enable-ntlm-auth-helpers="SMB,fakeauth" \
--enable-external-acl-helpers="ip_user,ldap_group,unix_group,wbinfo_group" \
--enable-auth="basic,digest,ntlm" \
--enable-digest-auth-helpers="password" \
--with-winbind-auth-challenge \
--enable-useragent-log \
--enable-referer-log \
--disable-dependency-tracking \
--enable-cachemgr-hostname=localhost \
--enable-underscores \
--enable-basic-auth-helpers="LDAP,MSNT,NCSA,PAM,SMB,YP,getpwnam,multi-domain-NTLM,SASL" \
--enable-cache-digests \
--enable-ident-lookups \
%ifnarch ppc64 ia64 x86_64 s390x
--with-large-files \
%endif
--enable-follow-x-forwarded-for \
--enable-wccpv2 \
--enable-fd-config \
--with-maxfd=16384 \
--enable-arp \
--enable-arp-acl \
Luego construimos el rpm rpmbuild -ba /usr/src/redhat/SPECS/squid.spec y esperamos los resultados en /usr/src/redhat/RPMS/
Finalmente instalamos nuestro instalador rpm
#rpm -ivh /usr/src/redhat/RPMS/i386/squid-2.6.STABLE6-5.3.i386.rpm
Ahora, solo queda mirar los inventarios por mac y a hacer las acls nomas
acl our_networks src 192.168.0.0/24
acl aclmac arp 00:08:A1:95:71:D4
http_access deny aclmac
http_access allow our_network
De tener alguna duda favor avisarme para mejorar este howto.
