Re: Whitelisting based on client IPs

Father Vlasie <[email protected]>
Newsgroups gmane.comp.web.privoxy.user
Message-ID <[email protected]>
Thank you!

FV

> On 9 Feb 2018, at 02:51, Fabian Keil <[email protected]> wrote:
> 
> Father Vlasie <[email protected]> wrote:
> 
>> I am new to Privoxy and I am trying to use it to replace a perl-based
>> custom whitelisting system.
>> 
>> I have read a lot of the documentation but I could not quite figure out
>> how to do what I need which is to whitelist websites based on the IP
>> address of the client.
>> 
>> I have tried adding the following code to the default.action file but it
>> just seems to block everything without making an exception for
>> 10.10.20.3 to reach wikipedia.org or 10.10.20.5 to reach m-w.com.
>> 
>> 8<----8<----8<----8<----8<----8<----8<----
>> 
>> {+block{This domain is not in the whitelist.}}
>> .
>> +client-header-tagger{client-ip-address}
> 
> The line above doesn't seem to be part of an action section.
> You may want to use:
> 
> {+client-header-tagger{client-ip-address}}
> /
> 
> instead.
> 
>> {-block}
>> .wikipedia.org/.
>> TAG:^IP-ADDRESS: 10\.10\.20\.3$
>> {-block}
>> .m-w.com/.
>> TAG:^IP-ADDRESS: 10\.10\.20\.5$
>> 
>> Any help is greatly appreciated!
> 
> Note that tag and URL patterns aren't combined with
> an "and" condition. Sections are enabled if any
> pattern matches.
> 
> You may want to use acls instead:
> https://www.privoxy.org/user-manual/config.html#ACLS
> 
> Fabian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.