Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi All
I need your help on this problem
I have blocked the downloading of the files with file formats as listed
below;It works okey when you try to download by clicking on the link BUT
when you right-click on a link and select the option save link as, it
allows downloads;Does anyone know how to deal with this?
# Access Denied Section
# ============================================== #
# Only allow cachemgr access from localhost
# Only allow purge requests from localhost
acl blockfiles urlpath_regex -i "/etc/squid3/blocks.files.acl"
acl workhours1 time MTWHF 08:00-12:59
acl BlockedSites dstdomain .facebook.com .myspace.com .twitter.com
.warez.com .quepasa.com .yahoo.com .mail.google.com
acl workhours2 time MTWHF 14:00-16:59
http_access deny workhours1 BlockedSites
http_access deny BlockedSites workhours2
#Content of blocks.files.acl
\.[Ee][Xx][Ee]$
\.[Aa][Vv][Ii]$
\.[Mm][Pp][Gg]$
\.[Mm][Pp][Ee][Gg]$
\.[Mm][Pp]3$
\.[Mm][Pp]4$
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420
Rep:
Hello,
Which OS you are using?
I am using RHEL 5.3 and I have also put the same kind of policies and mine is working fine. When I tried the way you described that right clicking on the link and saving it and then it allows you to download, it doesn't happen in my case.
My policies are like :
acl face dstdomain .facebook.com
acl mynet time MTWHF 8:30-17:30
http_access deny face mynet
And for file formats I have put them in squid file itself, not in some other file and then making a policy of retrieving the formats from that file. Here below is my policy in squid file :
I have tried the above but its not just working;Here are the lines i have put,i also tried to put all in one line but still no luck
Perhaps put the lines down for me the way you have done in yours and i will put them and then try;
here are my lines:
acl blockfiles urlpath_regex -i "/etc/squid3/blocks.files.acl"
acl workhours1 time MTWHF 08:00-12:59
acl BlockedSites dstdomain .facebook.com .myspace.com .twitter.com .warez.com .quepasa.com .yahoo.com .youtube.com
acl workhours2 time MTWHF 14:00-16:59
http_access deny workhours1 workhours2
http_access deny BlockedSites
http_access deny blockfiles
thanks
One more thing I would like to add, but I'm not sure. You can try giving the single space between MTWHF.
e.g.,
acl biz_network src 10.1.42.0/24
acl biz_hours time M T W T F 9:00-17:00
http_access allow biz_network biz_hours
Try this and let us know.
Hi Arya,
I dont really know where am going wrong,seems its not just happening
I have checked the /var/log/messages but nothing i can make sense out of it;
Should i say that for advanced users their is no way this would work because they will try to go round it?
Try this link wif you will download this mp3; http://dc225.4shared.com/download/1p...3e3b396f6f37cd
see if your configuration will work
If you are able to give me the exact syntax of file please do so that i can copy and paste then change where appropriate
Hi All
I need your help on this problem
I have blocked the downloading of the files with file formats as listed
below;It works okey when you try to download by clicking on the link BUT
when you right-click on a link and select the option save link as, it
allows downloads;Does anyone know how to deal with this?
This sounds very unusual and please make sure when you are using right click to download, that website is http or https ?
and make sure the permission on blocks.file is readable
you can limit the download size to prevent download using
Code:
reply_body_max_size
I would like to see the version of your squid
Hi,
I have done the above,unfortunately am not winning;Have you tried the other link i posted to see if its not downloading from your end?Please try this link again http://dc225.4shared.com/download/1p...396f6f37cd,let me know if you are able to download it even after setting the config file to reject.
I will keep trying aswell,Pls use either IE or firefox
and make sure the permission on blocks.file is readable
you can limit the download size to prevent download using
Code:
reply_body_max_size
I would like to see the version of your squid
Hi,
I have done the above,unfortunately am not winning;Have you tried the other link i posted to see if its not downloading from your end?Please try this link again http://dc225.4shared.com/download/1p...396f6f37cd,let me know if you are able to download it even after setting the config file to reject.
I will keep trying aswell,Pls use either IE or firefox,by the way its Squid3
guys,
i have equally tried to put the lines in the actual file,is this correct
acl blockfiles url_regex -i \.[Ee][Xx][Ee]$
acl blockfiles url_regex -i \.[Aa][Vv][Ii]$
acl blockfiles url_regex -i \.[Mm][Pp][Gg]$
acl blockfiles url_regex -i \.[Mm][Pp][Ee][Gg]$
acl blockfiles url_regex -i \.[Mm][Pp]3$
acl blockfiles url_regex -i \.[Mm][Pp]4$
acl workhours1 time M T W H F 08:00-12:59
acl BlockedSites dstdomain .facebook.com .myspace.com .twitter.com .warez.com .quepasa.com .yahoo.com .youtube.com
acl workhours2 time M T W H F 14:00-16:59
http_access deny workhours1 workhours2
http_access deny BlockedSites
http_access deny blockfiles
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.