Page 1 of 1

How can I restrict users to only open ghaniglass.com

Posted: Mon Oct 20, 2008 3:26 pm
by smk08
Aslamu Alaikum dear friends how are you. Friends I come to this forum after a long time and really need your urgent help. Your help is always beneficial for me, for this I really thankful to all the forum members.

Dear friends the problem is that I have 1 mb internet connections. I want that all 15 users can only open ghaniglass.com through my squid proxy server.



Your urgent help will be fruitful for me.


Thanks & Regards.

Re: How can I restrict users to only open ghaniglass.com

Posted: Mon Oct 20, 2008 5:25 pm
by Saad Khan
smk08 wrote:Aslamu Alaikum dear friends how are you. Friends I come to this forum after a long time and really need your urgent help. Your help is always beneficial for me, for this I really thankful to all the forum members.

Dear friends the problem is that I have 1 mb internet connections. I want that all 15 users can only open ghaniglass.com through my squid proxy server.



add following rules

----------------------------------------------------------
acl your_acl1_name src your_network/subnet
acl your_acl2_name dstdomain .ghaniglass.com

http_access allow your_acl1_name your_acl2_name
------------------------------------------------------------


e.g
------------------------------------------------
acl myacl1 src 192.168.0.0/255.255.255.0
acl myacl2 dstdomain .ghaniglass.com

http_access allow myacl1 myacl2
------------------------------------------------

and restart the squid.

Posted: Tue Oct 21, 2008 9:57 am
by x2oxen
No need to restart just

Code: Select all

squid -k reconfigure


will be enough

how to allow users to only read e mail.

Posted: Tue Oct 21, 2008 11:57 am
by smk08
Asslam Alaikum

Friend thanks for your help. Dear please tell me that how to allow some users only mail services like hotmail, yahoo and gmail etc.


Thanks again for your coopration.

Re: how to allow users to only read e mail.

Posted: Tue Oct 21, 2008 1:57 pm
by Saad Khan
smk08 wrote:Asslam Alaikum

Friend thanks for your help. Dear please tell me that how to allow some users only mail services like hotmail, yahoo and gmail etc.



add following rules

----------------------------------------------------------
acl your_acl1_name src your_user_ip
acl your_acl2_name dstdomain .hotmail.com .gmail.com mail.yahoo.com

http_access allow your_acl1_name your_acl2_name
------------------------------------------------------------


e.g
------------------------------------------------
acl myacl1 src 192.168.0.25
acl myacl2 dstdomain .hotmail.com .gmail.com mail.yahoo.com

http_access allow myacl1 myacl2
------------------------------------------------

reload configuration or restart your squid.

users can't able to login in hotmail, yahoo and gmail.

Posted: Wed Oct 22, 2008 7:20 am
by smk08
Asslamu Alaikum, dear friend i add following code to my squid.conf but it does not work.

acl mailusers src 172.16.0.10-15
acl email dstdomain .hotmail.com .mail.yahoo.com .gmail.com
http_access allow mailusers email

after that i reloaded my squid.conf file.


please help me little more how to allow users to just use e-mails through my squid proxy server.

Thanks & Regards.

Re: users can't able to login in hotmail, yahoo and gmail.

Posted: Wed Oct 22, 2008 9:12 am
by Saad Khan
smk08 wrote:Asslamu Alaikum, dear friend i add following code to my squid.conf but it does not work.

acl mailusers src 172.16.0.10-15
acl email dstdomain .hotmail.com .mail.yahoo.com .gmail.com
http_access allow mailusers email



Try to follow, what i have posted.
did i say to add the IP range like following rule?

acl mailusers src 172.16.0.10-15


you need to add rule for every single IP.

problem in yahoo mail

Posted: Thu Oct 23, 2008 8:16 am
by smk08
Asslamu Alaikum
Friend thanks for your help. dear hotmail and gmail are working properly but yahoo is not opening in its proper format.

acl test src 172.16.0.2
acl mail dstdomain .hotmail.com .live.com .gmail.com .google.com .yahoo.com

http_access allow test mail

i also tried .mail.yahoo.com but both have same results.
dear please help me little more.


Thanks & Regards.

Re: problem in yahoo mail

Posted: Thu Oct 23, 2008 10:17 am
by Saad Khan
smk08 wrote:
i also tried .mail.yahoo.com but both have same results.
dear please help me little more.




dont use dot with mail.yahoo.com.
just use mail.yahoo.com

Yahoo mail is still not opeing in its proper format

Posted: Mon Oct 27, 2008 8:10 am
by smk08
Asslamu Alaikum

dear friend yahoo mail is still not opening in its proper format. please help me how to get rid from this problem.
according to your help i tried
.yahoo.com .mail.yahoo.com and mail.yahoo.com


thanks & regards

Posted: Mon Oct 27, 2008 3:37 pm
by mudasir
Hi,

Dear smk08,

In squid the location of rules plays a very important role. The rules start to work from TOP to BOTTOM, so try to add rules like this

Code: Select all


#Define ACL's
acl all src 0.0.0.0/0.0.0.0
acl user src 192.168.0.0/255.255.255.0
acl mailuser src 192.168.1.2/255.255.255.0
acl myacl1 url_regex -i .ghaniglass.com
acl myacl2 url_regex -i .hotmail.com .gmail.com mail.yahoo.com

#Rules for Defined ACL's
http_access allow user myacl1
http_access allow mailuser myacl2
http_access deny all

Any allow rule after "http_access deny all" will not take effect.

Dont forget to run
squid -k reconfigure

I hope this will help you out.

now yahoo opens in its proper format

Posted: Tue Oct 28, 2008 8:56 am
by smk08
Asslamu Alaikum


Dear brothers thanks for help. now yahoo mail opens in its proper format when i use the following acl

acl mail url_regex yahoo.com akamai.net yimg.com


after adding akamai.net and yimg.com yahoo opens in its proper format.


Thanks & Regards.