How can I restrict users to only open ghaniglass.com

Discussion regarding the installation and configuration of Linux distributions.

How can I restrict users to only open ghaniglass.com

Postby smk08 » Mon Oct 20, 2008 3:26 pm

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.
Shahid Mahmood
0321-4538113
i am crazy to learn linux
smk08
Naik
 
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

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

Postby Saad Khan » Mon Oct 20, 2008 5:25 pm

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.
Saad Khan
Company Havaldaar Major
 
Posts: 155
Joined: Sun Jun 11, 2006 6:19 pm
Location: Karachi

Postby x2oxen » Tue Oct 21, 2008 9:57 am

No need to restart just

Code: Select all

squid -k reconfigure


will be enough
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
x2oxen
Major General
 
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Website: http://usmanpk.com
WLM: x2oxen@hotmail.com
Yahoo Messenger: x2oxen
Location: Faisalabad

how to allow users to only read e mail.

Postby smk08 » Tue Oct 21, 2008 11:57 am

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.
Shahid Mahmood

0321-4538113

i am crazy to learn linux
smk08
Naik
 
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

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

Postby Saad Khan » Tue Oct 21, 2008 1:57 pm

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.
Saad Khan
Company Havaldaar Major
 
Posts: 155
Joined: Sun Jun 11, 2006 6:19 pm
Location: Karachi

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

Postby smk08 » Wed Oct 22, 2008 7:20 am

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.
Shahid Mahmood

0321-4538113

i am crazy to learn linux
smk08
Naik
 
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

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

Postby Saad Khan » Wed Oct 22, 2008 9:12 am

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.
Saad Khan
Company Havaldaar Major
 
Posts: 155
Joined: Sun Jun 11, 2006 6:19 pm
Location: Karachi

problem in yahoo mail

Postby smk08 » Thu Oct 23, 2008 8:16 am

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.
Shahid Mahmood

0321-4538113

i am crazy to learn linux
smk08
Naik
 
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

Re: problem in yahoo mail

Postby Saad Khan » Thu Oct 23, 2008 10:17 am

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
Saad Khan
Company Havaldaar Major
 
Posts: 155
Joined: Sun Jun 11, 2006 6:19 pm
Location: Karachi

Yahoo mail is still not opeing in its proper format

Postby smk08 » Mon Oct 27, 2008 8:10 am

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
Shahid Mahmood

0321-4538113

i am crazy to learn linux
smk08
Naik
 
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

Postby mudasir » Mon Oct 27, 2008 3:37 pm

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.
Kind Regards
Mudasir Mirza (RHCE)
(+971)55-1045754
http://www.crystalnetworks.org
http://www.diglinux.com
mudasir
Captain
 
Posts: 565
Joined: Tue Oct 17, 2006 5:23 am
Website: http://www.crystalnetworks.org
Location: Dubai

now yahoo opens in its proper format

Postby smk08 » Tue Oct 28, 2008 8:56 am

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.
Shahid Mahmood

0321-4538113

i am crazy to learn linux
smk08
Naik
 
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan


Return to “%s” Installation

Who is online

Users browsing this forum: No registered users and 1 guest

cron