LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-14-2009, 10:27 AM   #1
Tibenda
LQ Newbie
 
Registered: Feb 2009
Location: Kampala - Uganda-Africa
Posts: 3

Rep: Reputation: 0
squid configuration


Hi.
I use ubuntu linux.
I have atransparent proxy server well configured and running.
I have basically denied some type of files and websites from getting accessed, I however want to restrict access to certain websites and to download of certain files to some users and allow access to the same files/websites to other users at the same time.
Currently i block access to all but i would like to put an exception to other users(IPs).
Need some help please.
Thanx
 
Old 02-14-2009, 11:13 AM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by Tibenda View Post
Currently i block access to all but i would like to put an exception to other users(IPs).
To do this you basically just need to use the src ACL with the exception IPs. Then put this into a "http_access allow" rule, while a later "http_access deny" would use the same ACLs minus the src one to match everyone else.

This example would grant access to microsoft.com only for IPs 192.168.1.113-192.168.1.119:
Code:
acl special_users src 192.168.1.113-192.168.1.119
acl special_website dstdomain .microsoft.com
http_access allow special_users special_website
http_access deny special_website

Last edited by win32sux; 02-14-2009 at 11:18 AM.
 
Old 02-15-2009, 04:04 AM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
...and do note that if some users are clever enough/malaevolent enough and have the access to change their IPs, you might want to consider whether this will really do what you want.
 
Old 02-15-2009, 06:00 AM   #4
Tibenda
LQ Newbie
 
Registered: Feb 2009
Location: Kampala - Uganda-Africa
Posts: 3

Original Poster
Rep: Reputation: 0
squid.conf - linux

Quote:
Originally Posted by win32sux View Post
To do this you basically just need to use the src ACL with the exception IPs. Then put this into a "http_access allow" rule, while a later "http_access deny" would use the same ACLs minus the src one to match everyone else.

This example would grant access to microsoft.com only for IPs 192.168.1.113-192.168.1.119:
Code:
acl special_users src 192.168.1.113-192.168.1.119
acl special_website dstdomain .microsoft.com
http_access allow special_users special_website
http_access deny special_website
Hi. Thanx for ur reply
I think it will help me.
I will try it tomorrow when i get back to office where da machines are.
How can i apply the same to files.
Like i have blocked download of some files such as .exe, how can i put the same exception for files in this case.

Thanx alot please.
 
Old 02-15-2009, 06:04 AM   #5
Tibenda
LQ Newbie
 
Registered: Feb 2009
Location: Kampala - Uganda-Africa
Posts: 3

Original Poster
Rep: Reputation: 0
can i use mac -addresses instead of IPs

Quote:
Originally Posted by salasi View Post
...and do note that if some users are clever enough/malaevolent enough and have the access to change their IPs, you might want to consider whether this will really do what you want.
Hi.
I appreciate querry!
Ist possible to use Mac-Addresses instead of IP addresses in the squid.conf file?
If so, how.
else, do you have/know any other method one could use?

Thanx Big time
 
Old 02-15-2009, 03:12 PM   #6
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by Tibenda View Post
How can i apply the same to files.
Like i have blocked download of some files such as .exe, how can i put the same exception for files in this case.
You can use the url_regex and/or rep_mime_type ACL.

Quote:
Ist possible to use Mac-Addresses instead of IP addresses in the squid.conf file?
If so, how.
else, do you have/know any other method one could use?
For working with MAC addresses, use the arp ACL.

Information about all of these is available all over the Web, one example location is here.
 
Old 02-16-2009, 06:18 AM   #7
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466
Blog Entries: 6

Rep: Reputation: 51
How can I restrict user to log-off the internet after 30 mins of usage in my cyber cafe store?
 
Old 02-16-2009, 07:22 AM   #8
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by your_shadow03 View Post
How can I restrict user to log-off the internet after 30 mins of usage in my cyber cafe store?
You've been here long enough to know that we don't tolerate thread hijacking.

Open a new thread for your question.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
squid 3 configuration wackolacko Linux - Server 3 01-19-2009 03:16 AM
squid configuration chandanperl Linux - Software 0 02-18-2008 05:50 AM
squid configuration er.pankajg General 3 03-13-2006 12:55 AM
Squid: special configuration for remote Squid server hamish Linux - Software 0 12-06-2005 03:58 PM
best squid configuration shanino Linux - Networking 11 08-21-2004 02:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration