LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Want to disable internet for particular IP's only. (https://www.linuxquestions.org/questions/linux-newbie-8/want-to-disable-internet-for-particular-ips-only-885565/)

gardenair 06-10-2011 06:26 AM

Want to disable internet for particular IP's only.
 
Hi,
I am using cent OS 5 as a proxy server. Internet is working fine on all users computers.I want to disable internet only two users in the network.Is there any way in squid that all the users can entertain internet expect two users.

In squid the network setting is

acl our_networks src 192.168.1.0/24
http_access allow our_networks


The users IP address are

192.168.1.50 and 192.168.1.51
and my squid proxy IP is 192.168.1.10

I even remove the proxy settings in mozilla but the users again put and enjoy internet.

Kindly guide me.
thanks.
garden

TB0ne 06-10-2011 08:10 AM

Quote:

Originally Posted by gardenair (Post 4381771)
Hi,
I am using cent OS 5 as a proxy server. Internet is working fine on all users computers.I want to disable internet only two users in the network.Is there any way in squid that all the users can entertain internet expect two users.

In squid the network setting is
acl our_networks src 192.168.1.0/24
http_access allow our_networks


The users IP address are
192.168.1.50 and 192.168.1.51 and my squid proxy IP is 192.168.1.10
I even remove the proxy settings in mozilla but the users again put and enjoy internet.

Ok, we can "guide you" to the Squid documentation. Set up an ACL for those users, and DENY that ACL access. That's it. It's well documented. You even have it in another thread of yours
http://www.linuxquestions.org/questi...559/page2.html

Look at the "banned sites" ACL.

gardenair 06-11-2011 04:43 AM

thanks a lot :hattip: .The post really help me.

I my opinion this case have two solution

Code:

#acl banned_sites url_regex "/etc/squid/squid-banned.acl"
#http_access deny banned_sites

or


Code:

acl block_host1 src 192.168.1.50
http_access deny block_host1
acl block_host2 src 192.168.1.51
http_access deny block_host2

Both are valid if i am correct but the 1st one is much flexible.

what is your technical opinion about it ? hope as you mentioned in the post "Look at the "banned sites" ACL"
garden

TB0ne 06-11-2011 10:43 AM

Quote:

Originally Posted by gardenair (Post 4382536)
thanks a lot. The post really help me.

Great. Then perhaps you could try to look more things up yourself in the future.
Quote:

I my opinion this case have two solution

Code:

#acl banned_sites url_regex "/etc/squid/squid-banned.acl"
#http_access deny banned_sites

or

Code:

acl block_host1 src 192.168.1.50
http_access deny block_host1
acl block_host2 src 192.168.1.51
http_access deny block_host2

Both are valid if i am correct but the 1st one is much flexible. what is your technical opinion about it ? hope as you mentioned in the post "Look at the "banned sites" ACL"
garden
Pick whichever one you want to use. This is YOUR server, so YOU have to be the one that is happy with the solution.

gardenair 06-12-2011 06:49 AM

Thanks for the reply.The "linuxquestions" is like a teacher for me. I appreciate its all members.:hattip:

Regards
garden


All times are GMT -5. The time now is 08:48 AM.