Operating System - Linux
1821537 Members
2582 Online
109633 Solutions
New Discussion юеВ

Squid: Problems in accessing some web sites

 
SOLVED
Go to solution
shetty
Frequent Advisor

Squid: Problems in accessing some web sites

Hi guys,
Iam using Linux(Red hat 9)with squid configured as the proxy server on that system.
I have created Some ACL's to block some sites.
They should be allowed only on particular timing(5pm-7pm).

The following are the ACL names,

dstdomain(domains to be blocked)
**********
.bollywoodmusic.com .bsmail.com .hotmail.com
.indiatimes.com .jobsahead.com .mail.com
.monster.com

During the particular period (5-7pm)iam able to open all the sites except hotmail.com.

Whenever i try to access hotmail.com, it says

ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://mail.yahoo.com/

The following error was encountered:

Access Denied.
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.


when i remove proxy and try it opening that web site, iam able to open www.yahoo.com.
But when i use proxy , iam getting the above errors.
Please help me in rectifying this problem.

Shetty.
10 REPLIES 10
Alexander Chuzhoy
Honored Contributor

Re: Squid: Problems in accessing some web sites

try to write .hotmail.com on it's own line in dstdomain list.
Hope it'll help.
Jerome Henry
Honored Contributor

Re: Squid: Problems in accessing some web sites

Hi,

From what you write, I understand that when you use hotmail.com, you are redirected to mail.yahoo.com.
So it seems that you have a deny all rule by default that still applies.
Could yout ell us if you can access any site (say www.linux.org) between 5 and 7 ?
Could you join your complete squid.conf ?
thks

J
You can lean only on what resists you...
shetty
Frequent Advisor

Re: Squid: Problems in accessing some web sites

Hi Alexander and Jerome Henry,
I have written as .hotmail.com in the acl and not hotmail.com.

When i use proxy iam not able to open hotmail.com , but iam able to open other sites(any) except hotmail.

When i remove proxy , iam able to access hotmail.com.

I have attached my squid.conf configuration file for your reference.Please help me to come out of this problem.

Regards.
Shetty.
Jerome Henry
Honored Contributor

Re: Squid: Problems in accessing some web sites

Hi,

Reading your squid.conf nothing appeared at first sight.
So I etherealled a connection to hotmail, and saw that each window is a new client connexion from your client machine (a new socket). So each windows, and there are 6 or them, is a new connxion.
In your squid.conf I read
acl numconn maxconn 5
So 5 conns are allowed max.
Try to set this value to a higher one, say 10 and try again... let us know.

BTW .hotmail.com should be ok

hth

Jerome Henry
You can lean only on what resists you...
Muthukumar_5
Honored Contributor

Re: Squid: Problems in accessing some web sites

Hai,

You are by default denying all acls there. You will get deny messages to *.yahoo.com,... etc in dstdomain and in all ur acl settings urls.

There is a lot of problem in your acl settings.
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: Squid: Problems in accessing some web sites

Don't chane acl all src setting ever. keep that acl as default, it will give the full 0.0.0.0/0.0.0.0 ip-address control.

acl myip src 10.0.0.102 10.0.0.103 10.0.0.105 10.0.0.112 10.0.0.219 10.0.0.221 10.0.0.223 10.0.0.26 10.0.0.26 10.0.0.28 10.0.0.5 10.0.0.113 10.0.0.53 10.0.0.55 10.0.0.56 10.0.0.57 10.0.0.61

acl dstdomain is okie. Don't use dot (.) in dstdom_regex. Else use \ with dot as \. to remove wild character effect.

You can not use regex pattern(s) in url_regex. You have to give full url's, else change to urlpath_regex as,


acl urlacl url_regex -i sex porn games music mp3 \.avi jobs monster monsterindia naukri \.mpeg mpg mpeg \.mpg \.wav \.jpeg \.jpg jpg jpeg jobs resume \.exe \.msi \.tar \.gz \.rpm \.rmvb \.rp \.rm \.rv \.m3u \.wav \.mpv \.mps \.m2v \.m1v \.mpe \.mpa \.avi

You have to use \ before . in dstdom_regex and urlpath_regex acl types.

Give the http_access controls as,

http_access deny myip dstdomain
http_access deny myip urlacl
http_access deny myip dstdom_regex
http_access allow all

Specify these http_access after default http_access rules. There is no need to use time and maxconn acl's for ur configuration. Comment ( # ) them out.

You can check acl settings check as,
/sbin/squid -k parse
If you get any error messages, you will having a problem on acl settings.
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor
Solution

Re: Squid: Problems in accessing some web sites

I am having ur squid.conf files.. Let me know your exact requirement.. I will help my best.

While sending squid.conf,don't send all commented informations, just as like,

squid -version and
/sbin/squid -v to get configuration options.

grep -v "^#" squid.conf > /tmp/squid.conf.log

It will reduce the file size and compact to lookin to the problem.
Easy to suggest when don't know about the problem!
shetty
Frequent Advisor

Re: Squid: Problems in accessing some web sites

Hi guys,
Thank you very much for your suggestions,i will check out and let you guys know the result.

Shetty.
shetty
Frequent Advisor

Re: Squid: Problems in accessing some web sites

Hi guys,
Thank you all for your suggestions. It's working fine now.

Regards.
Shyam
samir_29
New Member

Re: Squid: Problems in accessing some web sites

hello
shetty can you pleas send me now ur squid conf file coz i fasce the same problem but i can not get from it i try so hard but for shame i can not i still have this error i used wccp and start think that i will spend my life try solve this problem so pleas send my this config file after u solve this pleas.
my007ms@hotmail.com
my007ms@gamil.com