LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-28-2011, 12:27 PM   #1
syadz
LQ Newbie
 
Registered: Apr 2011
Posts: 4

Rep: Reputation: 0
Unhappy connect database to squid proxy server


hi all..

i have a problem about how to connect the database to proxy server.

example:: this is the acl in squid.conf to block the website.the keyword that want to block store in file .txt

acl block_advertisers urlpath_regex -i /etc/squid/
block_advertisers.txt

acl block_entertainment urlpath_regex -i /etc/squid/
block_entertainment.txt

acl block_webmail urlpath_regex -i /etc/squid/
block_webmail.txt

acl block_porn urlpath_regex -i /etc/squid/
block_porn.txt

and this is the activation:-

http_access deny block_advertisers

http_access deny block_entertainment

http_access deny block_porn

http_access deny block_webmail

what i need to do is to convert the place of storing the url from the file .txt to 1 database. i already create a database using LAMP name websiteblocking and create a table name block_advertisers, block_entertainment, block_porn, and block_webmail and store the data followed the table. here the problem is i have failed to connect the squid proxy server(squid 2.7stable9) to the database. i have try this but its not success.

acl websiteblocking urlpath_regex -i "/etc/sbin/squid/websiteblocking"

acl db-auth proxy_auth_regex REQUIRED

http_access deny websiteblocking

acl QUERY url_path cgi-bin /?

no_cache deny QUERY

a bit info, the data that stored in database is a keyword to block the website if a keyword in blacklist match with the url that want access by user. if match so then the user cannot access the website.

this project is like to centralize the data.hope anyone can help me and please correct me if i'm doing wrong... thanks in advance.sorry for my bad english..tq
 
Old 04-28-2011, 06:31 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Which version of squid are you using?

And what do the files you're trying to include look like?



Cheers,
Tink

Last edited by Tinkster; 04-28-2011 at 06:33 PM.
 
Old 04-28-2011, 09:51 PM   #3
syadz
LQ Newbie
 
Registered: Apr 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tinkster View Post
Which version of squid are you using?

And what do the files you're trying to include look like?



Cheers,
Tink

hi Tinkster, thanks for your reply. i used squid version 2.7 STABLE9. errr.. i dont know how to explain about the files.. but here what i want to know, how to call database that i store all the blacklist keyword to block URL. currently in squid configuration, the blacklist keyword save in file .txt by the category. now the data in file .txt i store in one database by the table. in this way no need to call every file .txt , i just used one ACL command to call database to filter the blacklist keyword. or in simple word i want to know how to connect the data that save out of squid...
 
Old 04-28-2011, 10:36 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Sorry mate, you lost me there ... I have no idea how *txt and
database hang together, and your explanation, lengthy as it is,
doesn't actually clarify your intentions to me at all; hope
someone other than myself can fathom what you're after.



Cheers,
Tink

Last edited by Tinkster; 04-28-2011 at 11:00 PM. Reason: network induced duplication removed
 
Old 04-29-2011, 03:20 AM   #5
syadz
LQ Newbie
 
Registered: Apr 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tinkster View Post
Sorry mate, you lost me there ... I have no idea how *txt and
database hang together, and your explanation, lengthy as it is,
doesn't actually clarify your intentions to me at all; hope
someone other than myself can fathom what you're after.



Cheers,
Tink

i want store the blacklist keyword in database not in file .txt ... have many example to store blacklist keyword in file .txt but dont have example for storing in database. its ok if u cant get me. anyway tq very much to your effort to help.. i really appreciate it
 
Old 04-29-2011, 10:56 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Ok, I think I *do* understand now. And if I read the docu for
squid correctly you're out of luck; the only database usage is
to use MySQL for authentication - to achieve what you want
you'll have to
a) use a different tool, e.g., Squidard
or
b) hack squid's source to make it do what you want.



Cheers,
Tink
 
Old 05-04-2011, 08:38 PM   #7
syadz
LQ Newbie
 
Registered: Apr 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tinkster View Post
Ok, I think I *do* understand now. And if I read the docu for
squid correctly you're out of luck; the only database usage is
to use MySQL for authentication - to achieve what you want
you'll have to
a) use a different tool, e.g., Squidard
or
b) hack squid's source to make it do what you want.



Cheers,
Tink

tq Tink.

i have 2 idea to settle it. 1st, used acl element: pathurl_regex, change at squid configuration-but still try it,try and error.2nd,squid connect to file .txt and in this file do the php programming to call dbase..this one not try yet, still try to create the php script to call the dbase
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Proxy Server on Ubuntu and WPAD - Proxy Auto Detection cheesewizz Linux - Networking 1 12-10-2010 03:49 AM
squid proxy server configuration & distribution of internet without proxy gaurav_gupta082 Linux From Scratch 2 07-31-2010 12:25 PM
Using ISA Server as Parent Proxy and want to setup Squid as dwonstream proxy tauseef1 Red Hat 1 04-09-2008 02:03 AM
squid proxy refuses to connect remote server through ssh yukinK Linux - Networking 10 02-16-2008 10:17 AM
Need help to connect a squid proxy to connect to another squid proxy server bellerophon Linux - Newbie 1 02-07-2006 07:52 AM


All times are GMT -5. The time now is 05:08 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration