LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-03-2013, 04:27 PM   #1
ls_milkyway
LQ Newbie
 
Registered: Aug 2013
Distribution: BT5R2
Posts: 28

Rep: Reputation: Disabled
Problem with external action file in privoxy


Hi !

I have declare few TLDs to be blocked in external privoxy action file (try.action) whose location is declared in main config file (/etc/privoxy/config) with entries:


+hide-user-agent {Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36}

# user-agent that should be available to all sites.

{+hide-referer {block}}

# referrers should be blocked for all sites.

{+block +handle-as-image}

.cm
.io
.info
.
.
so on

{-block -handle-as-image}

http://knowledge.info

# few urls that I dont want to be blocked

Only TLDs are getting blocked, other declartions are not working i.e

1) User-agent is not getting forged
2) How to check whether referrers are blocked or not (without webserver's log)?
3) TLD's are getting blocked.
4) http://knowledge.info is also getting blocked (whereas it should not).

I know, I am making a silly mistake.

Do declarations 1,2 and 4 need to be declared somewhere else for eg. in default.action file??

PLZ suggest.
Thanks in advance.
 
Old 09-03-2013, 06:29 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
Quote:
Originally Posted by ls_milkyway View Post
User-agent is not getting forged
IIRC default.action and standard.action shouldn't be messed with, you could add this declaration to the start of user.action which would match all URLs:
Code:
{
+hide-user-agent {Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36}
}
/
and check against http://config.privoxy.org/show-request or http://browserspy.dk/useragent.php.


Quote:
Originally Posted by ls_milkyway View Post
How to check whether referrers are blocked or not (without webserver's log)?
Set it to "+hide-referer{http://fbi.or.nsa/}" and visit http://www.whatismyreferer.com/ or http://browserspy.dk/headers.php ?


Quote:
Originally Posted by ls_milkyway View Post
http://knowledge.info is also getting blocked (whereas it should not).
Check the http://config.privoxy.org/show-url-i...wledge.info%2F link?
 
Old 09-04-2013, 05:07 AM   #3
ls_milkyway
LQ Newbie
 
Registered: Aug 2013
Distribution: BT5R2
Posts: 28

Original Poster
Rep: Reputation: Disabled
Thanks for quick response

I tried putting code on the top of user.action, but privoxy failed to start & logfile is showing
invalid line 1: {+hide-user-agent{.....} \

I tried changing syntax removing brackets,adding/removing space but its not working

Further I would like to ask how make privoxy pass ONLY https traffic via port 443?
Will {+limit-connect {443} +https-only} do the job?
 
Old 09-04-2013, 06:04 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
Quote:
Originally Posted by ls_milkyway View Post
I tried putting code on the top of user.action, but privoxy failed to start & logfile is showing
invalid line 1: {+hide-user-agent{.....} \
Post (or attach as plain text) the lines leading up to the "{+hide-user-agent{.....} \" line?


Quote:
Originally Posted by ls_milkyway View Post
Further I would like to ask how make Privoxy pass ONLY https traffic via port 443?
Will {+limit-connect {443} +https-only} do the job?
"limit-connect" only governs the ports Privoxy is allowed to connect to and the "https-only" I don't recognize. Point me to the documentation please?
 
Old 09-05-2013, 03:49 AM   #5
ls_milkyway
LQ Newbie
 
Registered: Aug 2013
Distribution: BT5R2
Posts: 28

Original Poster
Rep: Reputation: Disabled
Sep 05 01:14:09.652 7f3f0c3b6700 Fatal error: can't load actions file '/etc/privoxy/user.action': invalid line (1): {+hide-user-agent {Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36}} /

&

Actually, I was looking on internet for a way to make Privoxy pass ONLY
https traffic via port 443.There is no document describing {+limit-connect {443}
+https-only} , but found on a page at http://osdir.com/ml/web.privoxy.user.../msg00061.html

After careful reading I have realized that the poster ONLY WISHED if there was something like it to pass https only.
 
Old 09-06-2013, 01:04 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
I mean post (or attach as plain text) the lines leading up to the "{+hide-user-agent{.....} \" section in the configuration file? As for using Privoxy for HTTPS only that's not something you should do in Privoxy IMHO.
 
Old 09-06-2013, 04:25 AM   #7
ls_milkyway
LQ Newbie
 
Registered: Aug 2013
Distribution: BT5R2
Posts: 28

Original Poster
Rep: Reputation: Disabled
Gotcha!
The declaration cannot be added to the start of user.action. It has to be added after "settings " and "alais" section.

Here is a link explaining it


http://www.linuxquestions.org/questi...us-%7D-877250/

Please think from a paranoid's perspective
How good it would be to surf https sites only on privoxy+tor?
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dig output shows NOERROR but no IP and privoxy claims NXDOMAIN ( privoxy OFF) linuxStudent11 Linux - Networking 0 04-27-2011 10:45 PM
Tor / Privoxy problem! rameious Linux - Software 1 04-25-2008 08:22 AM
Privoxy 3.0.6 - Build Problem win32sux Ubuntu 1 11-06-2007 02:12 AM
Privoxy problem douart SUSE / openSUSE 12 07-02-2007 01:12 AM
Privoxy - "Privoxy is not being used" from http://www.privoxy.org/config/ slimjim Linux - Networking 1 03-12-2007 11:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:55 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
Open Source Consulting | Domain Registration