How can I restrict users to only open ghaniglass.com

Discussion regarding the installation and configuration of Linux distributions.
Post Reply
smk08
Naik
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

How can I restrict users to only open ghaniglass.com

Post 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.
Shahid Mahmood
0321-4538113
i am crazy to learn linux
Saad Khan
Company Havaldaar Major
Posts: 155
Joined: Sun Jun 11, 2006 6:19 pm
Location: Karachi

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

Post 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.
x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Post by x2oxen »

No need to restart just

Code: Select all

squid -k reconfigure
will be enough
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
smk08
Naik
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

how to allow users to only read e mail.

Post 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.
Shahid Mahmood
0321-4538113
i am crazy to learn linux
Saad Khan
Company Havaldaar Major
Posts: 155
Joined: Sun Jun 11, 2006 6:19 pm
Location: Karachi

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

Post 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.
smk08
Naik
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

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

Post 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.
Shahid Mahmood
0321-4538113
i am crazy to learn linux
Saad Khan
Company Havaldaar Major
Posts: 155
Joined: Sun Jun 11, 2006 6:19 pm
Location: Karachi

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

Post 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.
smk08
Naik
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

problem in yahoo mail

Post 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.
Shahid Mahmood
0321-4538113
i am crazy to learn linux
Saad Khan
Company Havaldaar Major
Posts: 155
Joined: Sun Jun 11, 2006 6:19 pm
Location: Karachi

Re: problem in yahoo mail

Post 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
smk08
Naik
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

Yahoo mail is still not opeing in its proper format

Post 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
Shahid Mahmood
0321-4538113
i am crazy to learn linux
mudasir
Captain
Posts: 565
Joined: Tue Oct 17, 2006 5:23 am
Location: Dubai
Contact:

Post 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.
Kind Regards
Mudasir Mirza (RHCE)
(+971)55-1045754
http://www.crystalnetworks.org
http://www.diglinux.com
smk08
Naik
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

now yahoo opens in its proper format

Post 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.
Shahid Mahmood
0321-4538113
i am crazy to learn linux
Post Reply