05 Maja 2024 15:28:45
Nawigacja
· Strona Główna
· Forum

· Tomato by Shibby
· FreshTomato


Wątki na forum
Najnowsze dyskusje
· [HOWTO] Kompilacja "...
· [Howto] Xpenology na...
· nju swiatło pytania
· konfiguracja router ...
· Asus TUF-AX3000_V2 p...
· Jaki router kupić? ...
· Szukam zaproszenia n...
· dodatkowe złącza s...
· RT-N18U - nie można...
· [MOD] Tomato64 (x86-64)
· Firewall nie zawsze ...
· [MOD] FreshTomato-AR...
· Optware na CIFS
· RT-AX56U - Status kl...
· [MOD] FreshTomato-MI...
· Multiroom N z wykorz...
· [S] Asus RT-AC68U E1
· [S] ASUS RT-AC68U
· Rozłączanie klient...
· serwer VPN za wan'em
Najpopularniejsze obecnie wątki
· [HOWTO] Kompilacj... [65]
· [Howto] Xpenology... [22]
· nju swiatło pytania [4]
Ankieta
Jaki procesor posiada twój router?

Broadcom MIPSEL
Broadcom MIPSEL
36% [151 głosów]

Broadcom ARM
Broadcom ARM
52% [216 głosów]

Atheros
Atheros
5% [22 głosów]

Marvell
Marvell
1% [4 głosów]

Ralink
Ralink
1% [3 głosów]

Intel/AMD/VIA
Intel/AMD/VIA
1% [5 głosów]

Żaden z powyższych
Żaden z powyższych
4% [15 głosów]

Ogółem głosów: 416
Musisz zalogować się, aby móc zagłosować.
Rozpoczęto: 02/02/2015 09:38
Twoje IP
3.12.155.100
Zobacz wątek
OpenLinksys » :: PORTAL :: » Tutoriale
 Drukuj wątek
[entware] Filtr reklam i rodzicielski, czyli tandem PRIVOXY+DANSGUARDIAN
lazik
[entware] Filtr reklam i rodzicielski, czyli tandem PRIVOXY+DANSGUARDIAN
Jest kilka rzeczy, które zaraz po nowozainstalowanym systemie próbuję skonfigurować. Jedna z nich to oczywiście przeglądarka i wycinanie reklam, których zwyczajnie nie lubię, nieakceptuję w ich nachalnej formie. Zazwyczaj w przeglądarkach używam tworów bazujących na kodzie mozzillowym, czy to firefoxa, czy chrome. Tam oczywiście jest znakomity dodatek adblock, który wycina odpowiednie śmieci. Niemniej jednak jak już mamy tomato to i otwiera się droga do uruchomienia filtrów na samym routerze - w razie reinstalacji systemu odchodzi nam jedna rzecz do konfigurowania. Dodatkowo jak już zaczynamy myśleć o pośredniku filtrującym to warto dołożyć jeszcze jedną opcję - filtr rodzinny. Poniżej postaram się przedstawić instalację Privoxy i Dansguardiana, które będą dbały o ruch przechodzący przez naszą sieć.

INSTALACJA PRIVOXY


opkg update
opkg install privoxy


Standardowo Privoxy jest już ustawione by działać na porcie 8118. Warto jednak przed pierwszym uruchomieniem zajrzeć jednak do pliku konfiguracyjnego /opt/etc/privoxy/config i w nim dokonać kilka szlifów. Najpierw sprawdzamy poprawność ścieżek dla confdir, logdir, user-manual. W polu admin-address wstawiamy własny adres email (a nóż ktoś zechce napisać do nas maila). Ważną rzeczą jest poprawne ustawienie opcji listen-address , która wskazuje ip i port na którym nasze proxy będzie nasłuchiwało. W przykładzie poniżej jest to 192.168.0.100 i port 8118. Ip 192.168.0.100 jest identyczne z ip routera ustawionym w br0 w konfiguracji Tomato pod BASIC>NETWORK>LAN. Poniżej mój plik konfiguracyjny.

confdir /opt/etc/privoxy
logdir /opt/var/log
user-manual /opt/share/doc/privoxy/user-manual/
admin-address usenet@thebat.net
filterfile default.filter
logfile privoxy
actionsfile match-all.action # Actions that are applied to all sites and maybe overruled later on.
actionsfile default.action   # Main actions file
actionsfile user.action      # User customizations
listen-address  192.168.0.100:8118
toggle  1
enable-remote-toggle  1
enable-remote-http-toggle  0
enable-edit-actions 1
enforce-blocks 0
buffer-limit 4096
forwarded-connect-retries  0
accept-intercepted-requests 1
allow-cgi-request-crunching 0
split-large-forms 0
keep-alive-timeout 5
socket-timeout 300
#permit-access  192.168.0.0/24
debug   1    # show each GET/POST/CONNECT request
debug   4096 # Startup banner and warnings
debug   8192 # Errors - *we highly recommended enabling this*
#proxy-info-url http://www.example.com/proxy-service.html
proxy-info-url http://config.privoxy.org/proxy-service.html
actionsfile adblock.script.action
filterfile adblock.script.filter
actionsfile adblock-pxf-polish.script.action
filterfile adblock-pxf-polish.script.filter
actionsfile easylist.script.action
filterfile easylist.script.filter
actionsfile easylistgermany.script.action
filterfile easylistgermany.script.filter
actionsfile easyprivacy.script.action
filterfile easyprivacy.script.filter
actionsfile fanboy-adblock.script.action
filterfile fanboy-adblock.script.filter


Takie ustawienie Privoxy właściwie pozwala na uruchomienie proxy i sprawdzenie jego działania. Do uruchomienia użyjemy plik /opt/etc/init.d/S24privoxy, który przeedytujemy tak, by w polu ARGS wskazywał na plik konfiguracyjny jaki chcemy używać z naszym privoxy. Plik chwilę wcześniej dostosowaliśmy do naszych wymagań także podajemy link do niego.

#!/bin/sh 

ENABLED=yes
PROCS=privoxy
ARGS="/opt/etc/privoxy/config"
PREARGS=""
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

. /opt/etc/init.d/rc.func


Przygotowany plik startowy pozwala na uruchomienie proxy. Wchodząc do konsoli wykonujemy polecenie:

/opt/etc/init.d/S24privoxy start

Jeżeli Privoxy uruchomii się bezbłędnie to w konsoli zobaczymy ładne info o tym, a wydane polecenie

ps|grep -v grep|grep "privoxy /opt/etc/privoxy/config"|wc -l

zwróci nam w rezultacie 1 jako wynik poprawnego jego działania.
Działanie privoxy testujemy także na komputerze w sieci wchodząc na adres http://www.privoxy.org/config/ który nam zwróci stronę z informacją:
automit.prosta.pl/privoxy.png
Nie ma się co obawiać, że coś jest nie tak. Wręcz przeciwnie taka strona oznacza, że nasze Privoxy działa i ma się dobrze, czekając na poprawną konfigurację naszej przeglądarki. Wykonajmy to zatem:
IE: Ustawienia (Alt+X) > Opcje internetowe > Połączenia > Ustawienia sieci LAN
automit.prosta.pl/privoxy%20ie.png
W Chrome powyższy zrzut będzie identyczny, a ustawienia te można wywołać poprzez Ustawienia > Zaawansowane > Zmień ustawienia serwera proxy > Ustawienia sieci LAN
Dla innych przeglądarek trzeba wykonać analogiczne czynności.
Po zatwierdzeniu ustawień jeszcze raz wchodzimy na stronę http://www.privoxy.org/config/. Jeżeli nasze ustawienia są poprawne otrzymamy informację w postaci strony konfiguracyjnej privoxy:
automit.prosta.pl/privoxy%20ok.png
Właściwie to mógłby być koniec tego tutka. Privoxy działa, nasza przeglądarka jest poprawnie skonfigurowana. Wystarczy tylko dodać wpis '/opt/etc/init.d/S24privoxy start' do skryptów startowych firewalla i to koniec. Niemniej jednak standardowe ustawienie wiele rzeczy nam nie załatwia. Brakuje podstawy działania adblocka tego znanego z firefoxa czy chrome - aktualizacji filtrów. Jest oczywiście na tą bolączkę sposób. Na początku przygotowujemy nasz skrypt aktualizujący wpisy w konfigach privoxy na podstawie list adblocka. Ja osobiście korzystam z tego rozwiązania http://andrwe.org/scripting/bash/privoxy-blocklist, które trzeba troszeczkę doszlifować do naszych polskich i entwarowych realiów. Pierwsza rzecz, która jest niezbędna to bash i wget obsługujący ssl:

opkg update
opkg install bash wget

Następnie kilka rzeczy w samym skrypcie trzeba zmienić dodając między innymi serwisy z jakich chcemy aktualizować zbiór filtrów, także nagłówek z lokalizacją basha i ścieżka do wgeta jest do poprawki. Działający skrypt, którego używam wygląda następująco:

 #!/opt/bin/bash
#
######################################################################
#
#                  Author: Andrwe Lord Weber
#                  Mail: lord-weber-andrwerenona-studiosorg
#                  Version: 0.2
#                  URL: http://andrwe.dyndns.org/doku.php/blog/scripting/bash/privoxy-blocklist
#
##################
#
#                  Sumary:
#                   This script downloads, converts and installs
#                   AdblockPlus lists into Privoxy
#
######################################################################
 
######################################################################
#
#                 TODO:
#                  - implement:
#                     domain-based filter
#
######################################################################
 
######################################################################
#
#                  script variables and functions
#
######################################################################
 
# array of URL for AdblockPlus lists
URLS=("https://easylist-downloads.adblockplus.org/easylist.txt" "https://easylist-downloads.adblockplus.org/easyprivacy.txt" "https://easylist-downloads.adblockplus.org/easylistgermany.txt" "http://www.niecko.pl/adblock/adblock.txt" "http://adblocklist.org/adblock-pxf-polish.txt"  "https://secure.fanboy.co.nz/fanboy-adblock.txt")
#URLS=("https://easylist-downloads.adblockplus.org/easylist.txt" "https://easylist-downloads.adblockplus.org/easyprivacy.txt" "https://easylist-downloads.adblockplus.org/easylistgermany.txt" "https://easylist-downloads.adblockplus.org/easylistitaly.txt" "https://dutchadblockfilters.googlecode.com/svn/trunk/AdBlock_Dutch_hide.txt" "http://lian.info.tm/liste_fr.txt" "https://adblock-chinalist.googlecode.com/svn/trunk/adblock.txt" "http://stanev.org/abp/adblock_bg.txt" "https://indonesianadblockrules.googlecode.com/hg/subscriptions/abpindo.txt" "http://www.niecko.pl/adblock/adblock.txt" "http://adblocklist.org/adblock-pxf-polish.txt" "http://www.bsi.info.pl/filtrABP.txt" "https://secure.fanboy.co.nz/fanboy-adblock.txt")
# privoxy config dir (default: /etc/privoxy/)
CONFDIR=/opt/etc/privoxy
# directory for temporary files
TMPDIR=/opt/tmp/privoxy-blocklist
TMPNAME=$(basename ${0})
 
######################################################################
#
#                  No changes needed after this line.
#
######################################################################
 
function usage()
{
   echo "${TMPNAME} is a script to convert AdBlockPlus-lists into Privoxy-lists and install them."
   echo " "
   echo "Options:"
   echo "      -h:    Show this help."
   echo "      -q:    Don't give any output."
   echo "      -v 1:  Enable verbosity 1. Show a little bit more output."
   echo "      -v 2:  Enable verbosity 2. Show a lot more output."
   echo "      -v 3:  Enable verbosity 3. Show all possible output and don't delete temporary files.(For debugging only!!)"
   echo "      -r:    Remove all lists build by this script."
}
 
[ ${UID} -ne 0 ] && echo -e "Root privileges needed. Exit.\n\n" && usage && exit 1
 
# check whether an instance is already running
[ -e ${TMPDIR}/${TMPNAME}.lock ] && echo "An Instance of ${TMPNAME} is already running. Exit" && exit
 
DBG=0
 
function debug()
{
   [ ${DBG} -ge ${2} ] && echo -e "${1}"
}
 
function main()
{
   cpoptions=""
   [ ${DBG} -gt 0 ] && cpoptions="-v"
 
   for url in ${URLS[@]}
   do
      debug "Processing ${url} ...\n" 0
      file=${TMPDIR}/$(basename ${url})
      actionfile=${file%\.*}.script.action
      filterfile=${file%\.*}.script.filter
      list=$(basename ${file%\.*})
 
      # download list
      debug "Downloading ${url} ..." 0
      /opt/bin/wget -t 3 --no-check-certificate -O ${file} ${url} >${TMPDIR}/wget-${url//\//#}.log 2>&1
      debug "$(cat ${TMPDIR}/wget-${url//\//#}.log)" 2
      debug ".. downloading done." 0
      [ "$(grep -E '^\[Adblock.*\]$' ${file})" == "" ] && echo "The list recieved from ${url} isn't an AdblockPlus list. Skipped" && continue
 
      # convert AdblockPlus list to Privoxy list
      # blacklist of urls
      debug "Creating actionfile for ${list} ..." 1
      echo -e "{ +block{${list}} }" > ${actionfile}
      sed '/^!.*/d;1,1 d;/^@@.*/d;/\$.*/d;/#/d;s/\./\\./g;s/\?/\\?/g;s/\*/.*/g;s/(/\\(/g;s/)/\\)/g;s/\[/\\[/g;s/\]/\\]/g;s/\^/[\/\&:\?=_]/g;s/^||/\./g;s/^|/^/g;s/|$/\$/g;/|/d' ${file} >> ${actionfile}
      debug "... creating filterfile for ${list} ..." 1
      echo "FILTER: ${list} Tag filter of ${list}" > ${filterfile}
      # set filter for html elements
      sed '/^#/!d;s/^##//g;s/^#\(.*\)\[.*\]\[.*\]*/s|<([a-zA-Z0-9]+)\\s+.*id=.?\1.*>.*<\/\\1>||g/g;s/^#\(.*\)/s|<([a-zA-Z0-9]+)\\s+.*id=.?\1.*>.*<\/\\1>||g/g;s/^\.\(.*\)/s|<([a-zA-Z0-9]+)\\s+.*class=.?\1.*>.*<\/\\1>||g/g;s/^a\[\(.*\)\]/s|.*<\/a>||g/g;s/^\([a-zA-Z0-9]*\)\.\(.*\)\[.*\]\[.*\]*/s|<\1.*class=.?\2.*>.*<\/\1>||g/g;s/^\([a-zA-Z0-9]*\)#\(.*\):.*[:[^:]]*[^:]*/s|<\1.*id=.?\2.*>.*<\/\1>||g/g;s/^\([a-zA-Z0-9]*\)#\(.*\)/s|<\1.*id=.?\2.*>.*<\/\1>||g/g;s/^\[\([a-zA-Z]*\).=\(.*\)\]/s|\1^=\2>||g/g;s/\^/[\/\&:\?=_]/g;s/\.\([a-zA-Z0-9]\)/\\.\1/g' ${file} >> ${filterfile}
      debug "... filterfile created - adding filterfile to actionfile ..." 1
      echo "{ +filter{${list}} }" >> ${actionfile}
      echo "*" >> ${actionfile}
      debug "... filterfile added ..." 1
      debug "... creating and adding whitlist for urls ..." 1
      # whitelist of urls
      echo "{ -block }" >> ${actionfile}
      sed '/^@@.*/!d;s/^@@//g;/\$.*/d;/#/d;s/\./\\./g;s/\?/\\?/g;s/\*/.*/g;s/(/\\(/g;s/)/\\)/g;s/\[/\\[/g;s/\]/\\]/g;s/\^/[\/\&:\?=_]/g;s/^||/\./g;s/^|/^/g;s/|$/\$/g;/|/d' ${file} >> ${actionfile}
      debug "... created and added whitelist - creating and adding image handler ..." 1
      # whitelist of image urls
      echo "{ -block +handle-as-image }" >> ${actionfile}
      sed '/^@@.*/!d;s/^@@//g;/\$.*image.*/!d;s/\$.*image.*//g;/#/d;s/\./\\./g;s/\?/\\?/g;s/\*/.*/g;s/(/\\(/g;s/)/\\)/g;s/\[/\\[/g;s/\]/\\]/g;s/\^/[\/\&:\?=_]/g;s/^||/\./g;s/^|/^/g;s/|$/\$/g;/|/d' ${file} >> ${actionfile}
      debug "... created and added image handler ..." 1
      debug "... created actionfile for ${list}." 1
 
      # install Privoxy actionsfile
      cp ${cpoptions} ${actionfile} ${CONFDIR}
      if [ "$(grep $(basename ${actionfile}) ${CONFDIR}/config)" == "" ]
      then
         debug "\nModifying ${CONFDIR}/config ..." 0
         sed "s/^actionsfile user\.action/actionsfile $(basename ${actionfile})\nactionsfile user.action/" ${CONFDIR}/config > ${TMPDIR}/config
         debug "... modification done.\n" 0
         debug "Installing new config ..." 0
         cp ${cpoptions} ${TMPDIR}/config ${CONFDIR}
         debug "... installation done\n" 0
      fi   
      # install Privoxy filterfile
      cp ${cpoptions} ${filterfile} ${CONFDIR}
      if [ "$(grep $(basename ${filterfile}) ${CONFDIR}/config)" == "" ]
      then
         debug "\nModifying ${CONFDIR}/config ..." 0
         sed "s/^\(#*\)filterfile user\.filter/filterfile $(basename ${filterfile})\n\1filterfile user.filter/" ${CONFDIR}/config > ${TMPDIR}/config
         debug "... modification done.\n" 0
         debug "Installing new config ..." 0
         cp ${cpoptions} ${TMPDIR}/config ${CONFDIR}
         debug "... installation done\n" 0
      fi   
 
      debug "... ${url} installed successfully.\n" 0
   done
}
 
# create temporary directory and lock file
mkdir -p ${TMPDIR}
touch ${TMPDIR}/${TMPNAME}.lock
 
# set command to be run on exit
[ ${DBG} -le 2 ] && trap "rm -fr ${TMPDIR};exit" INT TERM EXIT
 
# loop for options
while getopts ":hrqv:" opt
do
   case "${opt}" in
      "h")
         usage
         exit 0
         ;;
      "v")
         DBG="${OPTARG}"
         ;;
      "q")
         DBG=-1
         ;;
      "r")
         echo "Do you really want to remove all build lists?(y/N)"
         read choice
         [ "${choice}" != "y" ] && exit 0
         rm -rf ${CONFDIR}/*.script.{action,filter} && \
         sed '/^actionsfile .*\.script\.action$/d;/^filterfile .*\.script\.filter$/d' -i ${CONFDIR}/config && \
         echo "Lists removed." && exit 0
         echo -e "An error occured while removing the lists.\nPlease have a look into ${CONFDIR} whether there are .script.* files and search for *.script.* in ${CONFDIR}/config."
         exit 1
         ;;
      ":")
         echo "${TMPNAME}: -${OPTARG} requires an argument" >&2
         exit 1
         ;;
   esac
done
 
debug "URL-List: ${URLS}\nPrivoxy-Configdir: ${CONFDIR}\nTemporary directory: ${TMPDIR}" 2
main
 
# restore default exit command
trap - INT TERM EXIT
[ ${DBG} -lt 2 ] && rm -r ${TMPDIR}
[ ${DBG} -eq 2 ] && rm -vr ${TMPDIR}
exit 0

Nadając skryptowi prawa do wykonywania przegrywamy go np. do /opt/etc/init.d/ nadając mu nazwę privoxyupdate. Następnie by darować sobie przypominanie o aktualizacji filtrów wykorzystujemy schedulera dostępnego w Tomato wpisując w ustawienie użytkownika odpowiednie regułki uruchamiania:
automit.prosta.pl/privoxy%20scheduler.png
Powyższe ustawienia będą uruchamiały skrypt codziennie o godzinie 0:00.
Na tym właściwie konfiguracja Privoxy jest zakończona.

OCHRONA RODZICIELSKA - DANSGUARDIAN

Poprawnie skonfigurowane Privoxy pozwala na zaprzęgnięcie do pracy DANSGUARDIANA jako filtr ochrony rodzicielskiej. Narzędzie działa bardzo sprawnie, także osoby chcące chronić swe maluchy przez niepożądanymi treściami zapewne zechcą skorzystać z jego możliwości.
Na początku instalujemy paczkę:

opkg update
opkg install dansguardian

Paczka instaluje prawie wszystkie niezbędne pliki, a co najważniejsze jest wstępnie skonfigurowana. Działać niestety nie będzie, ale za chwilę ją spacyfikujemy. Otwieramy zatem konfigurację /opt/etc/dansguardian/dansguardian.conf i w pliku ustawiamy przede wszystkim:
- language, język komunikatów dansguardiana, zmieniamy na 'polish'
- filterport, czyli port na który będziemy się łączyli do dansguardiana,
- proxyip, czyli IP na którym nasłuc****e nasze proxy (listen-address z pliku konfiguracyjnego privoxy - /opt/etc/privoxy/config)
- proxyport, czyli port na którym nasłuc****e nasze proxy
Poniżej konfiguracja jaką ja używam:


# DansGuardian config file for version 2.10.1.1

# **NOTE** as of version 2.7.5 most of the list files are now in dansguardianf1.conf


# Web Access Denied Reporting (does not affect logging)
#
# -1 = log, but do not block - Stealth mode
#  0 = just say 'Access Denied'
#  1 = report why but not what denied phrase
#  2 = report fully
#  3 = use HTML template file (accessdeniedaddress ignored) - recommended
#
reportinglevel = 3

# Language dir where languages are stored for internationalisation.
# The HTML template within this dir is only used when reportinglevel
# is set to 3. When used, DansGuardian will display the HTML file instead of
# using the perl cgi script.  This option is faster, cleaner
# and easier to customise the access denied page.
# The language file is used no matter what setting however.
#
languagedir = '/opt/share/dansguardian/languages'

# language to use from languagedir.
language = 'polish'

# Logging Settings
#
# 0 = none  1 = just denied  2 = all text based  3 = all requests
loglevel = 2

# Log Exception Hits
# Log if an exception (user, ip, URL, phrase) is matched and so
# the page gets let through.  Can be useful for diagnosing
# why a site gets through the filter.
# 0 = never log exceptions
# 1 = log exceptions, but do not explicitly mark them as such
# 2 = always log & mark exceptions (default)
logexceptionhits = 2

# Log File Format
# 1 = DansGuardian format (space delimited)
# 2 = CSV-style format
# 3 = Squid Log File Format
# 4 = Tab delimited
logfileformat = 1

# truncate large items in log lines
#maxlogitemlength = 400

# anonymize logs (blank out usernames & IPs)
#anonymizelogs = on


# Syslog logging
#
# Use syslog for access logging instead of logging to the file
# at the defined or built-in "loglocation"
#syslog = on

# Log file location
#
# Defines the log directory and filename.
#loglocation = '/opt/var/log/dansguardian/access.log'


# Statistics log file location
#
# Defines the stat file directory and filename.
# Only used in conjunction with maxips > 0
# Once every 3 minutes, the current number of IPs in the cache, and the most
# that have been in the cache since the daemon was started, are written to this
# file. IPs persist in the cache for 7 days.
#statlocation = '/opt/var/log/dansguardian/stats'


# Network Settings
#
# the IP that DansGuardian listens on.  If left blank DansGuardian will
# listen on all IPs.  That would include all NICs, loopback, modem, etc.
# Normally you would have your firewall protecting this, but if you want
# you can limit it to a certain IP. To bind to multiple interfaces,
# specify each IP on an individual filterip line.
filterip =

# the port that DansGuardian listens to.
filterport = 9090

# the ip of the proxy (default is the loopback - i.e. this server)
# proxyip = 127.0.0.1
proxyip = 192.168.0.100

# the port DansGuardian connects to proxy on
proxyport = 8118

# Whether to retrieve the original destination IP in transparent proxy
# setups and check it against the domain pulled from the HTTP headers.
#
# Be aware that when visiting sites which use a certain type of round-robin
# DNS for load balancing, DG may mark requests as invalid unless DG gets
# exactly the same answers to its DNS requests as clients.  The chances of
# this happening can be increased if all clients and servers on the same LAN
# make use of a local, caching DNS server instead of using upstream DNS
# directly.
#
# See http://www.kb.cert.org/vuls/id/435052
# on (default) | off
#!! Not compiled !! originalip = on

# accessdeniedaddress is the address of your web server to which the cgi
# dansguardian reporting script was copied. Only used in reporting levels 1 and 2.
#
# This webserver must be either:
#  1. Non-proxied. Either a machine on the local network, or listed as an exception
#     in your browser's proxy configuration.
#  2. Added to the exceptionsitelist. Option 1 is preferable; this option is
#     only for users using both transparent proxying and a non-local server
#     to host this script.
#
# Individual filter groups can override this setting in their own configuration.
#
accessdeniedaddress = 'http://YOURSERVER.YOURDOMAIN/cgi-bin/dansguardian.pl'

# Non standard delimiter (only used with accessdeniedaddress)
# To help preserve the full banned URL, including parameters, the variables
# passed into the access denied CGI are separated using non-standard
# delimiters. This can be useful to ensure correct operation of the filter
# bypass modes. Parameters are split using "::" in place of "&", and "==" in
# place of "=".
# Default is enabled, but to go back to the standard mode, disable it.
nonstandarddelimiter = on



# Banned image replacement
# Images that are banned due to domain/url/etc reasons including those
# in the adverts blacklists can be replaced by an image.  This will,
# for example, hide images from advert sites and remove broken image
# icons from banned domains.
# on (default) | off
usecustombannedimage = on
custombannedimagefile = '/opt/share/dansguardian/transparent1x1.gif'



# Filter groups options
# filtergroups sets the number of filter groups. A filter group is a set of content
# filtering options you can apply to a group of users.  The value must be 1 or more.
# DansGuardian will automatically look for dansguardianfN.conf where N is the filter
# group.  To assign users to groups use the filtergroupslist option.  All users default
# to filter group 1.  You must have some sort of authentication to be able to map users
# to a group.  The more filter groups the more copies of the lists will be in RAM so
# use as few as possible.
filtergroups = 1
filtergroupslist = '/opt/etc/dansguardian/lists/filtergroupslist'



# Authentication files location
bannediplist = '/opt/etc/dansguardian/lists/bannediplist'
exceptioniplist = '/opt/etc/dansguardian/lists/exceptioniplist'



# Show weighted phrases found
# If enabled then the phrases found that made up the total which excedes
# the naughtyness limit will be logged and, if the reporting level is
# high enough, reported. on | off
showweightedfound = on

# Weighted phrase mode
# There are 3 possible modes of operation:
# 0 = off = do not use the weighted phrase feature.
# 1 = on, normal = normal weighted phrase operation.
# 2 = on, singular = each weighted phrase found only counts once on a page.
#
weightedphrasemode = 2



# Positive (clean) result caching for URLs
# Caches good pages so they don't need to be scanned again.
# It also works with AV plugins.
# 0 = off (recommended for ISPs with users with disimilar browsing)
# 1000 = recommended for most users
# 5000 = suggested max upper limit
# If you're using an AV plugin then use at least 5000.
urlcachenumber = 1000
#
# Age before they are stale and should be ignored in seconds
# 0 = never
# 900 = recommended = 15 mins
urlcacheage = 900



# Clean cache for content (AV) scan results
# By default, to save CPU, files scanned and found to be
# clean are inserted into the clean cache and NOT scanned
# again for a while.  If you don't like this then choose
# to disable it.
# (on|off) default = on.
scancleancache = on



# Smart, Raw and Meta/Title phrase content filtering options
# Smart is where the multiple spaces and HTML are removed before phrase filtering
# Raw is where the raw HTML including meta tags are phrase filtered
# Meta/Title is where only meta and title tags are phrase filtered (v. quick)
# CPU usage can be effectively halved by using setting 0 or 1 compared to 2
# 0 = raw only
# 1 = smart only
# 2 = both of the above (default)
# 3 = meta/title
phrasefiltermode = 2

# Lower casing options
# When a document is scanned the uppercase letters are converted to lower case
# in order to compare them with the phrases.  However this can break Big5 and
# other 16-bit texts.  If needed preserve the case.  As of version 2.7.0 accented
# characters are supported.
# 0 = force lower case (default)
# 1 = do not change case
# 2 = scan first in lower case, then in original case
preservecase = 0

# Note:
# If phrasefiltermode and preserve case are both 2, this equates to 4 phrase
# filtering passes. If you have a large enough userbase for this to be a
# worry, and need to filter pages in exotic character encodings, it may be
# better to run two instances on separate servers: one with preservecase 1
# (and possibly forcequicksearch 1) and non ASCII/UTF-8 phrase lists, and one
# with preservecase 0 and ASCII/UTF-8 lists.



# Hex decoding options
# When a document is scanned it can optionally convert %XX to chars.
# If you find documents are getting past the phrase filtering due to encoding
# then enable.  However this can break Big5 and other 16-bit texts.
# off = disabled (default)
# on = enabled
hexdecodecontent = off



# Force Quick Search rather than DFA search algorithm
# The current DFA implementation is not totally 16-bit character compatible
# but is used by default as it handles large phrase lists much faster.
# If you wish to use a large number of 16-bit character phrases then
# enable this option.
# off (default) | on (Big5 compatible)
forcequicksearch = off



# Reverse lookups for banned site and URLs.
# If set to on, DansGuardian will look up the forward DNS for an IP URL
# address and search for both in the banned site and URL lists.  This would
# prevent a user from simply entering the IP for a banned address.
# It will reduce searching speed somewhat so unless you have a local caching
# DNS server, leave it off and use the Blanket IP Block option in the
# bannedsitelist file instead.
reverseaddresslookups = off



# Reverse lookups for banned and exception IP lists.
# If set to on, DansGuardian will look up the forward DNS for the IP
# of the connecting computer.  This means you can put in hostnames in
# the exceptioniplist and bannediplist.
# If a client computer is matched against an IP given in the lists, then the
# IP will be recorded in any log entries; if forward DNS is successful and a
# match occurs against a hostname, the hostname will be logged instead.
# It will reduce searching speed somewhat so unless you have a local DNS server,
# leave it off.
reverseclientiplookups = off


# Perform reverse lookups on client IPs for successful requests.
# If set to on, DansGuardian will look up the forward DNS for the IP
# of the connecting computer, and log host names (where available) rather than
# IPs against requests.
# This is not dependent on reverseclientiplookups being enabled; however, if it
# is, enabling this option does not incur any additional forward DNS requests.
logclienthostnames = off


# Build bannedsitelist and bannedurllist cache files.
# This will compare the date stamp of the list file with the date stamp of
# the cache file and will recreate as needed.
# If a bsl or bul .processed file exists, then that will be used instead.
# It will increase process start speed by 300%.  On slow computers this will
# be significant.  Fast computers do not need this option. on | off
createlistcachefiles = on



# POST protection (web upload and forms)
# does not block forms without any file upload, i.e. this is just for
# blocking or limiting uploads
# measured in kibibytes after MIME encoding and header bumph
# use 0 for a complete block
# use higher (e.g. 512 = 512Kbytes) for limiting
# use -1 for no blocking
#maxuploadsize = 512
#maxuploadsize = 0
maxuploadsize = -1



# Max content filter size
# Sometimes web servers label binary files as text which can be very
# large which causes a huge drain on memory and cpu resources.
# To counter this, you can limit the size of the document to be
# filtered and get it to just pass it straight through.
# This setting also applies to content regular expression modification.
# The value must not be higher than maxcontentramcachescansize
# The size is in Kibibytes - eg 2048 = 2Mb
# use 0 to set it to maxcontentramcachescansize
maxcontentfiltersize = 256



# Max content ram cache scan size
# This is only used if you use a content scanner plugin such as AV
# This is the max size of file that DG will download and cache
# in RAM.  After this limit is reached it will cache to disk
# This value must be less than or equal to maxcontentfilecachescansize.
# The size is in Kibibytes - eg 10240 = 10Mb
# use 0 to set it to maxcontentfilecachescansize
# This option may be ignored by the configured download manager.
maxcontentramcachescansize = 2000



# Max content file cache scan size
# This is only used if you use a content scanner plugin such as AV
# This is the max size file that DG will download
# so that it can be scanned or virus checked.
# This value must be greater or equal to maxcontentramcachescansize.
# The size is in Kibibytes - eg 10240 = 10Mb
maxcontentfilecachescansize = 20000



# File cache dir
# Where DG will download files to be scanned if too large for the
# RAM cache.
filecachedir = '/tmp'



# Delete file cache after user completes download
# When a file gets save to temp it stays there until it is deleted.
# You can choose to have the file deleted when the user makes a sucessful
# download.  This will mean if they click on the link to download from
# the temp store a second time it will give a 404 error.
# You should configure something to delete old files in temp to stop it filling up.
# on|off (defaults to on)
deletedownloadedtempfiles = on



# Initial Trickle delay
# This is the number of seconds a browser connection is left waiting
# before first being sent *something* to keep it alive.  The
# *something* depends on the download manager chosen.
# Do not choose a value too low or normal web pages will be affected.
# A value between 20 and 110 would be sensible
# This may be ignored by the configured download manager.
initialtrickledelay = 20



# Trickle delay
# This is the number of seconds a browser connection is left waiting
# before being sent more *something* to keep it alive.  The
# *something* depends on the download manager chosen.
# This may be ignored by the configured download manager.
trickledelay = 10



# Download Managers
# These handle downloads of files to be filtered and scanned.
# They differ in the method they deal with large downloads.
# Files usually need to be downloaded 100% before they can be
# filtered and scanned before being sent on to the browser.
# Normally the browser can just wait, but with content scanning,
# for example to AV, the browser may timeout or the user may get
# confused so the download manager has to do some sort of
# 'keep alive'.
#
# There are various methods possible but not all are included.
# The author does not have the time to write them all so I have
# included a plugin systam.  Also, not all methods work with all
# browsers and clients.  Specifically some fancy methods don't
# work with software that downloads updates.  To solve this,
# each plugin can support a regular expression for matching
# the client's user-agent string, and lists of the mime types
# and extensions it should manage.
#
# Note that these are the matching methods provided by the base plugin
# code, and individual plugins may override or add to them.
# See the individual plugin conf files for supported options.
#
# The plugins are matched in the order you specify and the last
# one is forced to match as the default, regardless of user agent
# and other matching mechanisms.
#
downloadmanager = '/opt/etc/dansguardian/downloadmanagers/fancy.conf'
##!! Not compiled !! downloadmanager = '/opt/etc/dansguardian/downloadmanagers/trickle.conf'
downloadmanager = '/opt/etc/dansguardian/downloadmanagers/default.conf'



# Content Scanners (Also known as AV scanners)
# These are plugins that scan the content of all files your browser fetches
# for example to AV scan.  The options are limitless.  Eventually all of
# DansGuardian will be plugin based.  You can have more than one content
# scanner. The plugins are run in the order you specify.
# This is one of the few places you can have multiple options of the same name.
#
# Some of the scanner(s) require 3rd party software and libraries eg clamav.
# See the individual plugin conf file for more options (if any).
#
#!! Not compiled !! contentscanner = '/opt/etc/dansguardian/contentscanners/clamav.conf'
#!! Not compiled !! contentscanner = '/opt/etc/dansguardian/contentscanners/clamdscan.conf'
#!! Unimplemented !! contentscanner = '/opt/etc/dansguardian/contentscanners/kavav.conf'
#!! Not compiled !! contentscanner = '/opt/etc/dansguardian/contentscanners/kavdscan.conf'
#!! Not compiled !! contentscanner = '/opt/etc/dansguardian/contentscanners/icapscan.conf'
#!! Not compiled !! contentscanner = '/opt/etc/dansguardian/contentscanners/commandlinescan.conf'



# Content scanner timeout
# Some of the content scanners support using a timeout value to stop
# processing (eg AV scanning) the file if it takes too long.
# If supported this will be used.
# The default of 60 seconds is probably reasonable.
contentscannertimeout = 60



# Content scan exceptions
# If 'on' exception sites, urls, users etc will be scanned
# This is probably not desirable behavour as exceptions are
# supposed to be trusted and will increase load.
# Correct use of grey lists are a better idea.
# (on|off) default = off
contentscanexceptions = off



# Auth plugins
# These replace the usernameidmethod* options in previous versions. They
# handle the extraction of client usernames from various sources, such as
# Proxy-Authorisation headers and ident servers, enabling requests to be
# handled according to the settings of the user's filter group.
# Multiple plugins can be specified, and will be queried in order until one
# of them either finds a username or throws an error. For example, if Squid
# is configured with both NTLM and Basic auth enabled, and both the 'proxy-basic'
# and 'proxy-ntlm' auth plugins are enabled here, then clients which do not support
# NTLM can fall back to Basic without sacrificing access rights.
#
# If you do not use multiple filter groups, you need not specify this option.
#
#authplugin = '/opt/etc/dansguardian/authplugins/proxy-basic.conf'
#authplugin = '/opt/etc/dansguardian/authplugins/proxy-digest.conf'
#!! Not compiled !! authplugin = '/opt/etc/dansguardian/authplugins/proxy-ntlm.conf'
#authplugin = '/opt/etc/dansguardian/authplugins/ident.conf'
#authplugin = '/opt/etc/dansguardian/authplugins/ip.conf'



# Re-check replaced URLs
# As a matter of course, URLs undergo regular expression search/replace (urlregexplist)
# *after* checking the exception site/URL/regexpURL lists, but *before* checking against
# the banned site/URL lists, allowing certain requests that would be matched against the
# latter in their original state to effectively be converted into grey requests.
# With this option enabled, the exception site/URL/regexpURL lists are also re-checked
# after replacement, making it possible for URL replacement to trigger exceptions based
# on them.
# Defaults to off.
recheckreplacedurls = off



# Misc settings

# if on it adds an X-Forwarded-For: to the HTTP request
# header.  This may help solve some problem sites that need to know the
# source ip. on | off
forwardedfor = off


# if on it uses the X-Forwarded-For: to determine the client
# IP. This is for when you have squid between the clients and DansGuardian.
# Warning - headers are easily spoofed. on | off
u****forwardedfor = off


# if on it logs some debug info regarding fork()ing and accept()ing which
# can usually be ignored.  These are logged by syslog.  It is safe to leave
# it on or off
logconnectionhandlingerrors = on



# Fork pool options

# If on, this causes DG to write to the log file whenever child processes are
# created or destroyed (other than by crashes). This information can help in
# understanding and tuning the following parameters, but is not generally
# useful in production.
logchildprocesshandling = off

# sets the maximum number of processes to spawn to handle the incoming
# connections.  Max value usually 250 depending on OS.
# On large sites you might want to try 180.
maxchildren = 40


# sets the minimum number of processes to spawn to handle the incoming connections.
# On large sites you might want to try 32.
minchildren = 8


# sets the minimum number of processes to be kept ready to handle connections.
# On large sites you might want to try 8.
minsparechildren = 4


# sets the minimum number of processes to spawn when it runs out
# On large sites you might want to try 10.
preforkchildren = 6


# sets the maximum number of processes to have doing nothing.
# When this many are spare it will cull some of them.
# On large sites you might want to try 64.
maxsparechildren = 32


# sets the maximum age of a child process before it croaks it.
# This is the number of connections they handle before exiting.
# On large sites you might want to try 10000.
maxagechildren = 500


# Sets the maximum number client IP addresses allowed to connect at once.
# Use this to set a hard limit on the number of users allowed to concurrently
# browse the web. Set to 0 for no limit, and to disable the IP cache process.
maxips = 0



# Process options
# (Change these only if you really know what you are doing).
# These options allow you to run multiple instances of DansGuardian on a single machine.
# Remember to edit the log file path above also if that is your intention.

# IPC filename
#
# Defines IPC server directory and filename used to communicate with the log process.
ipcfilename = '/tmp/.dguardianipc'

# URL list IPC filename
#
# Defines URL list IPC server directory and filename used to communicate with the URL
# cache process.
urlipcfilename = '/tmp/.dguardianurlipc'

# IP list IPC filename
#
# Defines IP list IPC server directory and filename, for communicating with the client
# IP cache process.
ipipcfilename = '/tmp/.dguardianipipc'

# PID filename
#
# Defines process id directory and filename.
#pidfilename = '/opt/var/run/dansguardian.pid'

# Disable daemoning
# If enabled the process will not fork into the background.
# It is not usually advantageous to do this.
# on|off (defaults to off)
nodaemon = off

# Disable logging process
# on|off (defaults to off)
nologger = off

# Enable logging of "ADs" category blocks
# on|off (defaults to off)
logadblocks = off

# Enable logging of client User-Agent
# Some browsers will cause a *lot* of extra information on each line!
# on|off (defaults to off)
loguseragent = off

# Daemon runas user and group
# This is the user that DansGuardian runs as.  Normally the user/group nobody.
# Uncomment to use.  Defaults to the user set at compile time.
# Temp files created during virus scanning are given owner and group read
# permissions; to use content scanners based on external processes, such as
# clamdscan, the two processes must run with either the same group or user ID.
daemonuser = 'root'
daemongroup = 'root'

# Soft restart
# When on this disables the forced killing off all processes in the process group.
# This is not to be confused with the -g run time option - they are not related.
# on|off (defaults to off)
softrestart = off

# Mail program
# Path (sendmail-compatible) email program, with options.
# Not used if usesmtp is disabled (filtergroup specific).
#!! Not compiled !!mailer = '/usr/sbin/sendmail -t'


Warto także przeedytować drugi plik konfiguracyjny dansguardianf1.conf zmieniejąc w nim za dansguardian.pl "limit grzeczności" i baypass pozwalający na wejście na stronę pomimo jej zablokowania przez reguły:
naughtynesslimit = 150
bypass = 1800
bypasskey = ''
Program jest właściwie już skonfigurowany. Potrzebujemy jednak jeszcze kilku plików, które nie są dostępne w paczce pod entware, a pozwalają na spolszczenie komunikatów dansguardiana. Paczkę załączam do tutka, wystarczy jej zawartość umieścić w /opt/share/dansguardian/languages/polish/. Warto także w tej lokalizacji podmienić template informacji o zablokowaniu strony na tą przygotowaną przez dansguardian.pl także w załączniku (template2.html - oryginalny szablon dansguardiana).
Wszystko przegrane i skonfigurowane. Uruchamiamy Dansguardiana z linii komend wydając polecenie (w celu automatycznego uruchamiania serwisu wraz ze startem tomato linijkę dodajemy do skryptu firewalla):

/opt/etc/init.d/S24dansguardian start


Jeżeli wszystko jest ok, komenda ps pokaże nam w liście uruchominuch rzeczy także dansguardiana (wpisów może być więcej niż jeden). Pozostaje ustawienie proxy w naszych przeglądarkach. Stosując te same kroki jak przy uruchamianiu privoxy w oknie konfiguracyjnym zmieniamy port na ten z ustawień dansguardiana czyli 9090 stosując konfiguracje z tego tutka.

I to właściwie jest koniec konfiguracji zarówno adblocka jak i filtru rodzicielskiego. Poprawne ich działanie będzie wycinało reklamy a także chroniło przez niepożądanymi zawartościami witryn. Test można przeprowadzić chociażby wpisując w pasku adres XXX lub używając w googlach jakieś zabronione zapytanie. Pamiętać jednak należy, że filtry nie działają przy połączeniach szyfrowanych, także każde zapytanie poprzez stronę https będzie niestety wykonywane bez filtrowania.

Powyższą konfigurację można także uprościć by nie konfigurować proxy w naszych przeglądarkach. Należy wtedy skonfigurować poprzez iptables transparentne proxy, które będzie kierowało ruch na dansguardiana i privoxy. belliash ;) walczył z problemem i podał działąjące rozwiązanie. Dla pary privox+dansguardian należy wykonać następujący skrypt:


PROXY_PORT=9090
LAN_IP='nvram get lan_ipaddr'
iptables -t nat -A PREROUTING -p tcp -m multiport --dports 80,443,8080 ! -d $LAN_IP -j DNAT --to-destination $LAN_IP:$PROXY_PORT

W powyższym kodzie w linii PROXY_PORT należy wpisać port DANSGUARDIANA na którym on nasłuc****e. Jeżelki byśmy chcieli użyć tylko samego privoxy to w porcie wstawiamy port dla privoxy, który standardowo nasłuc****e na 8118. Powyższy kod najlepiej dodać do skryptu firewalla.
lazik załączono następujące plik:
Nie masz uprawnień, by zobaczyć załączniki w tym wątku.

Edytowany przez lazik dnia 03-08-2012 19:25
 
przemasisko
@lazik bardzo dobre i rzeczowe tutki! Właśnie o tym samym pomyślałem przesiadając się na Entware. Przerażała mnie konfiguracja privoxy, a tu proszę wszystko na tacy Smile

Zastanawia mnie tylko jedna rzecz, jak zmusić privoxy do pracy w trybie transparent? Tak, aby odeszła również sprawa konfiguracji przeglądarek. Może masz już sprawdzone regułki.

I jeszcze jedna sprawa, jak wygląda obciążenie routera? Jakbyś napisał ile łyka to pamięci i CPU.
 
lazik

Cytat

przemasisko napisał(a):

@lazik bardzo dobre i rzeczowe tutki! Właśnie o tym samym pomyślałem przesiadając się na Entware. Przerażała mnie konfiguracja privoxy, a tu proszę wszystko na tacy Smile

Zastanawia mnie tylko jedna rzecz, jak zmusić privoxy do pracy w trybie transparent? Tak, aby odeszła również sprawa konfiguracji przeglądarek. Może masz już sprawdzone regułki.

I jeszcze jedna sprawa, jak wygląda obciążenie routera? Jakbyś napisał ile łyka to pamięci i CPU.

Nie mam pojęcia jak sprawdzić zajęcie pamięci i procesora przez ten tandem. Jak dasz namiar na jakiś tutek to chętnie dodam informację.

Co do transparentnego proxy to miałem nadzieję że coś takiego zadziała jak poniżej ale niestety:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
 
przemasisko
W sumie wystarczy mi informacja z htop w trakcie działania, czyli na przykład ktoś przegląda www.
 
lazik

Cytat

przemasisko napisał(a):

W sumie wystarczy mi informacja z htop w trakcie działania, czyli na przykład ktoś przegląda www.

Doinstalowałem htopa i poniżej zrzuty - daje czadu. Jedno przy 14 stronach na raz a drugie przy 28 stronach. Jak się patrzy na dane spod webui tomato to pamięć właściwie się tam nie zmienia a zajętość procesora jest chyba zbugowana, bo tam 100% w życiu nie widziałem.
Po starcie Dans zabiera u mnie około 25MB patrząc na dane spod GUI tomato i właściwie nie ma zmian w pamięci czy to przy intensywnym przeglądaniu www czy też nie.
lazik załączono następujące plik:
Nie masz uprawnień, by zobaczyć załączniki w tym wątku.
 
lazik

Cytat

ryzhov_al napisał(a):

Cytat

Co do transparentnego proxy to miałem nadzieję że coś takiego zadziała jak poniżej ale niestety:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080

Privoxy will act as transparent proxy if you fix privoxy cofig:

accept-intercepted-requests 1
Sorry for english.

Yes but we need also to add iptables rules. Here is explanation http://blog.bodhizazen.net/linux/how-to-transparent-proxy/
I don't know how to configure all to work like transparent proxy.

Zaktualizowałem konfig privoxy dla tych co im się nie załączały aktualizowane filtry adblocka. Dodatkowo warto w schedulerze prócz /opt/etc/init.d/privoxyupdate wstawić dodatkową linię restartującą privoxy po tej komendzie.
 
anonim747874734
@lazik - brawo ! - odpowiedź na ogromne zapotrzebowanie rynku Smile w końcu niektórzy mają pociechy i trzeba je pacyfikować Smile

Cytat

przemasisko napisał(a):
Zastanawia mnie tylko jedna rzecz, jak zmusić privoxy do pracy w trybie transparent? Tak, aby odeszła również sprawa konfiguracji przeglądarek. Może masz już sprawdzone regułki.

można też zatrudnić dnsmasq aby rozsyłał skrypt do autokonfiguracji przeglądarek, ja miałem tak zrobione na microsoftowym dhcp:
więcej info tu : http://users.telenet.be/mydotcom/libr...rk/pac.htm

do całego tego tandemu brakuje mi jednak jednej rzeczy - jakiegoś miejsca do patrzenia co-kto-kiedy i jak długo oglądał Smile
można zmienić w konfiguracji dansguardiana loglevel na all i logfileformat na Squid'owy i wtedy postawić malutki LighSquid na lighttpd i mięc ładne raporty i statystyki (generowane np raz dziennie) Smile
i wszystko w wersji light Smile
http://lightsquid.sourceforge.net/dem...9&month=08

OT : sam używam takiego kompletu "light" dla 40 osób ze squidem na debianie... połowa z nich mnie kocha a druga połowa nienawidzi Grin
 
bynio
Przydałoby się kilka uwag technicznych odnośnie sprzętu na którym to stoi (ram, cpu) i choćby subiektywnej oceny skuteczności rozwiązań. Dansguardiana kiedyś stosowałem, ale na zwykłym debianie x86 jego proces był dość zasobożerny i nie wiem czy np routerek z 32MB ramu go "udźwignie".
 
bynio
Aha, proponowałbym też zmniejszyć o jedno zero parametr maxcontentfilecachescansize jeżeli 'filecachedir = '/tmp''. Tmp w tomato jest w ram-ie więc szybko może go zapchać wywalając router z małą ilością wolnego ram-u. Problemem był też downloader wbudowany w dansguardiana - przejmował on zadania downloadu, i zanim udostępnił link to wcześniej próbował go skanować antywirusem. Tu wtyczek av nie ma, ale downloader jest aktywny. Może wypadałoby go wyłączyć aby dansguardian nie ingerował w pobieranie plików?

Połączony z 31 lipiec 2012 11:25:50:

Cytat

ryzhov_al napisał(a):

Oh, yes. Dansguardian slows web traffic a bit even on RT-N66u. Privoxy - not, i don't even feel a privoxy presence on 20Mb/s channel.


Ok, but RT-N66u have a 256MB RAM, on a little router with 32MB of ram dansguardian can work? How much of ram takes privoxy process?
Edytowany przez bynio dnia 31-07-2012 11:26
 
bynio
Thanks for reply.
 
belliash

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8118

U mnie wpisanie tej reguly iptables konczy sie nastepujacym bledem:
iptables: No chain/target/match by that name

Zastosowalem wiec inna, ale nie przyniosla oczekiwanego efektu (tj transparentne proxy nie dziala):

iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:8118


Połączony z 31 lipiec 2012 19:30:52:
Ciekawe... Wyglada na to, ze podana wczesniej regulka jednak dziala... http://config.privoxy.org/ poprawnie wyswietla wtedy wszystkie informacje. Sek w tym ze nie filtruje to reklam. Przykladowo strona openlinksys.info - po lewej stronie w bloku jest miejsce na reklame. Gdy dam tylko regule - reklama jest. Gdy ustawie proxy we wlasciwosciach polaczenia w FF - reklama znika... Ktos ma jakis pomysl?

Połączony z 01 sierpień 2012 10:00:57:
OK, ten problem juz rozwiazalem. Pojawil sie natomiast inny:
1) przez proxy przepuszczany jest tez ruch wychodzacy, na interfejsie ppp0 adres zrodlowy ma wtedy ustawiony na adres routera - HTB dla ruchu wychodzacego nie dziala, bo kazdy komputer wysyla dane w swiat z tego samego wewnetrznego IP
2) limit dziala w obrebie klasy; oznacza to ze wpisanie takich regulek:

iptables -t mangle -A POSTROUTING ! -s 192.168.1.0/24 -d 192.168.1.2 -j MARK --set-mark 10
iptables -t mangle -A POSTROUTING -s 192.168.1.1 -d 192.168.1.2 -j MARK --set-mark 10

spowoduje limitowanie ruchu zarowno pomiedzy kompem a internetem (wtedy dziala w 100%) jak i pomiedzy tym kompem a routerem; nie limitujac przy tym ruchu wewnatrz LANu (nie liczac oczywiscie trasy router<->komp). Sprawa jest o tyle fajna, ze pobierajac dane jednoczesnie bezposrednio np z FTP i z WWW przez privoxy, sumaryczny trnasfer nie przekracza tego ustawionego dla danej klasy. W koncu jest to 1 i ten sam komp. Problem polega na tym, ze pobierajac z FTP mam ~1MiB/s a pobierajac z WWW ~800KiB/s. Po wylaczeniu privoxy - z WWW rozniez jest ~1MiB/s. Widac to takze w speedtescie. Wyglada wiec na to, ze privoxy spowalnia ruch do ok 80%. Co moznaby z tym jeszcze zrobic?

Połączony z 01 sierpień 2012 10:23:47:
No i dochodzimy do sedna... Przydalby sie REDIRECT, ale:

insmod: can't insert '/lib/modules/2.6.22.19/kernel/net/bridge/netfilter/ebt_redirect.ko': unknown symbol in module, or unknown parameter

Tomato USB-RT 97EN

Połączony z 02 sierpień 2012 15:10:47:

iptables -t nat -A PREROUTING -p tcp -m multiport --dports 80,443,8080 ! -d 192.168.1.1 -j DNAT --to-destination 192.168.1.1:8118



Dzieki takiej regulce mozemy przeslac przez privoxy caly ruch http, wlacznie z SSL, jednoczesnie pomijajac strone konfiguracyjna naszego routera. Moze komus sie przyda
Edytowany przez belliash dnia 02-08-2012 15:10
 
lazik

Cytat

belliash napisał(a):

iptables -t nat -A PREROUTING -p tcp -m multiport --dports 80,443,8080 ! -d 192.168.1.1 -j DNAT --to-destination 192.168.1.1:8118

Dzieki takiej regulce mozemy przeslac przez privoxy caly ruch http, wlacznie z SSL, jednoczesnie pomijajac strone konfiguracyjna naszego routera. Moze komus sie przyda

Sposób działa, uaktualniłem pierwszy wpis. Dzięki

Połączony z 02 sierpień 2012 15:29:51:
Jeszcze jedno udogodnienie widzę jakie pewnie byłoby porzadane. Uzależnić ten powyższy wpis od zbioru ipków, dla jakich chcemy by to działało
Edytowany przez lazik dnia 02-08-2012 15:30
 
belliash
hmmm a ja widze ze przy przekierownaiu na porcie 443, niektore strony laduja sie zauwazalnie dluzej. Tez tak masz?

Do tego, odnosze wrażenie, że nie filtruje wszystkich reklam, część z nich faktycznie znika, pozostałe zostają, w logach zauważyłem kilka błędów:


2012-08-02 16:03:27.396 2aab0310 Info: Privoxy version 3.0.19
2012-08-02 16:03:27.397 2aab0310 Info: Program name: privoxy
2012-08-02 16:05:26.200 2aab0310 Info: exiting by signal 15 .. bye
2012-08-02 16:05:27.337 2aab0310 Info: Privoxy version 3.0.19
2012-08-02 16:05:27.338 2aab0310 Info: Program name: privoxy
2012-08-02 16:05:27.338 2aab0310 Info: Loading filter file: /opt/etc/privoxy/default.filter
2012-08-02 16:05:27.386 2aab0310 Info: Loading filter file: /opt/etc/privoxy/adblock.script.filter
2012-08-02 16:05:27.386 2aab0310 Error: Adding re_filter job '*[src[/&:?=_]="http://go\.arbopl\.bbelements\.com/logos/"]' to filter adblock failed with error -101.
2012-08-02 16:05:27.387 2aab0310 Info: Loading filter file: /opt/etc/privoxy/adblock-pxf-polish.script.filter
2012-08-02 16:05:27.387 2aab0310 Error: Adding re_filter job 'div[id*="reklam"],div[class="reklam"]' to filter adblock-pxf-polish failed with error 2.
2012-08-02 16:05:27.389 2aab0310 Info: Loading filter file: /opt/etc/privoxy/easylist.script.filter
2012-08-02 16:05:33.207 2aab0310 Error: Adding re_filter job 's|.*||g' to filter easylist failed with error 68.
2012-08-02 16:05:34.814 2aab0310 Info: Loading filter file: /opt/etc/privoxy/easylistgermany.script.filter
2012-08-02 16:05:34.843 2aab0310 Error: Adding re_filter job 'input[onclick[/&:?=_]="window\.open('http://www\.firstload\.de/affiliate/"]' to filter easylistgermany failed with error -101.
2012-08-02 16:05:34.843 2aab0310 Info: Loading filter file: /opt/etc/privoxy/easyprivacy.script.filter
2012-08-02 16:05:34.844 2aab0310 Info: Loading filter file: /opt/etc/privoxy/fanboy-adblock.script.filter
2012-08-02 16:05:34.849 2aab0310 Error: Adding re_filter job 's|onclick[/&:?=_]="window\.open('http://adultfriendfinder\.com/search/">||g' to filter fanboy-adblock failed with error 70.
2012-08-02 16:05:51.818 2aab0310 Error: Adding re_filter job 'A[href[/&:?=_]="http://secure\.hostgator\.com/~affiliat/"]' to filter fanboy-adblock failed with error -101.
2012-08-02 16:05:51.822 2aab0310 Error: Adding re_filter job 'A[href[/&:?=_]="http://www\.dreamhost\.com/r\.cgi?"]' to filter fanboy-adblock failed with error -101.
2012-08-02 16:05:51.830 2aab0310 Error: Adding re_filter job 'div[id[/&:?=_]="ava_"][style="text-align:center;"]' to filter fanboy-adblock failed with error 2.
2012-08-02 16:05:51.854 2aab0310 Error: Adding re_filter job 'a\.ad_policy' to filter fanboy-adblock failed with error -101.
2012-08-02 16:05:51.922 2aab0310 Error: Adding re_filter job 'div[id[/&:?=_]="div-gpt-ad-"]' to filter fanboy-adblock failed with error 2.
2012-08-02 16:05:51.926 2aab0310 Error: Adding re_filter job 'iframe[src[/&:?=_]="http://ad\.yieldmanager\.com/"]' to filter fanboy-adblock failed with error -101.
2012-08-02 16:05:51.927 2aab0310 Info: Loading actions file: /opt/etc/privoxy/match-all.action
2012-08-02 16:05:51.928 2aab0310 Info: Loading actions file: /opt/etc/privoxy/default.action
2012-08-02 16:05:52.014 2aab0310 Info: Loading actions file: /opt/etc/privoxy/user.action
2012-08-02 16:05:52.021 2aab0310 Info: Loading actions file: /opt/etc/privoxy/adblock.script.action
2012-08-02 16:05:52.038 2aab0310 Info: Loading actions file: /opt/etc/privoxy/adblock-pxf-polish.script.action
2012-08-02 16:05:52.051 2aab0310 Info: Loading actions file: /opt/etc/privoxy/easylist.script.action
2012-08-02 16:05:52.477 2aab0310 Info: Loading actions file: /opt/etc/privoxy/easylistgermany.script.action
2012-08-02 16:05:52.631 2aab0310 Info: Loading actions file: /opt/etc/privoxy/easyprivacy.script.action
2012-08-02 16:05:52.829 2aab0310 Info: Loading actions file: /opt/etc/privoxy/fanboy-adblock.script.action
2012-08-02 16:05:53.154 2aab0310 Info: Listening on port 8118 on IP address 192.168.1.1
2012-08-02 16:09:48.135 2e45c690 Error: write to client failed: Operation now in progress

Edytowany przez belliash dnia 02-08-2012 16:15
 
lazik

Cytat

belliash napisał(a):

hmmm a ja widze ze przy przekierownaiu na porcie 443, niektore strony laduja sie zauwazalnie dluzej. Tez tak masz?

Wogóle sens filtrowania 443 jest żaden bo po to jest to szyfrowane by nic po drodze nie ingerowało w treść. Nie sprawdzałem jak z czasami dla https - mam ten port wyłączony.


Cytat

Do tego, odnosze wrażenie, że nie filtruje wszystkich reklam, część z nich faktycznie znika, pozostałe zostają, w logach zauważyłem kilka błędów:


2012-08-02 16:03:27.396 2aab0310 Info: Privoxy version 3.0.19
2012-08-02 16:03:27.397 2aab0310 Info: Program name: privoxy
2012-08-02 16:05:26.200 2aab0310 Info: exiting by signal 15 .. bye
2012-08-02 16:05:27.337 2aab0310 Info: Privoxy version 3.0.19
2012-08-02 16:05:27.338 2aab0310 Info: Program name: privoxy
2012-08-02 16:05:27.338 2aab0310 Info: Loading filter file: /opt/etc/privoxy/default.filter
2012-08-02 16:05:27.386 2aab0310 Info: Loading filter file: /opt/etc/privoxy/adblock.script.filter
2012-08-02 16:05:27.386 2aab0310 Error: Adding re_filter job '*[src[/&:?=_]="http://go\.arbopl\.bbelements\.com/logos/"]' to filter adblock failed with error -101.
2012-08-02 16:05:27.387 2aab0310 Info: Loading filter file: /opt/etc/privoxy/adblock-pxf-polish.script.filter
2012-08-02 16:05:27.387 2aab0310 Error: Adding re_filter job 'div[id*="reklam"],div[class="reklam"]' to filter adblock-pxf-polish failed with error 2.
2012-08-02 16:05:27.389 2aab0310 Info: Loading filter file: /opt/etc/privoxy/easylist.script.filter
2012-08-02 16:05:33.207 2aab0310 Error: Adding re_filter job 's|.*||g' to filter easylist failed with error 68.
2012-08-02 16:05:34.814 2aab0310 Info: Loading filter file: /opt/etc/privoxy/easylistgermany.script.filter
2012-08-02 16:05:34.843 2aab0310 Error: Adding re_filter job 'input[onclick[/&:?=_]="window\.open('http://www\.firstload\.de/affiliate/"]' to filter easylistgermany failed with error -101.
2012-08-02 16:05:34.843 2aab0310 Info: Loading filter file: /opt/etc/privoxy/easyprivacy.script.filter
2012-08-02 16:05:34.844 2aab0310 Info: Loading filter file: /opt/etc/privoxy/fanboy-adblock.script.filter
2012-08-02 16:05:34.849 2aab0310 Error: Adding re_filter job 's|onclick[/&:?=_]="window\.open('http://adultfriendfinder\.com/search/">||g' to filter fanboy-adblock failed with error 70.
2012-08-02 16:05:51.818 2aab0310 Error: Adding re_filter job 'A[href[/&:?=_]="http://secure\.hostgator\.com/~affiliat/"]' to filter fanboy-adblock failed with error -101.
2012-08-02 16:05:51.822 2aab0310 Error: Adding re_filter job 'A[href[/&:?=_]="http://www\.dreamhost\.com/r\.cgi?"]' to filter fanboy-adblock failed with error -101.
2012-08-02 16:05:51.830 2aab0310 Error: Adding re_filter job 'div[id[/&:?=_]="ava_"][style="text-align:center;"]' to filter fanboy-adblock failed with error 2.
2012-08-02 16:05:51.854 2aab0310 Error: Adding re_filter job 'a\.ad_policy' to filter fanboy-adblock failed with error -101.
2012-08-02 16:05:51.922 2aab0310 Error: Adding re_filter job 'div[id[/&:?=_]="div-gpt-ad-"]' to filter fanboy-adblock failed with error 2.
2012-08-02 16:05:51.926 2aab0310 Error: Adding re_filter job 'iframe[src[/&:?=_]="http://ad\.yieldmanager\.com/"]' to filter fanboy-adblock failed with error -101.
2012-08-02 16:05:51.927 2aab0310 Info: Loading actions file: /opt/etc/privoxy/match-all.action
2012-08-02 16:05:51.928 2aab0310 Info: Loading actions file: /opt/etc/privoxy/default.action
2012-08-02 16:05:52.014 2aab0310 Info: Loading actions file: /opt/etc/privoxy/user.action
2012-08-02 16:05:52.021 2aab0310 Info: Loading actions file: /opt/etc/privoxy/adblock.script.action
2012-08-02 16:05:52.038 2aab0310 Info: Loading actions file: /opt/etc/privoxy/adblock-pxf-polish.script.action
2012-08-02 16:05:52.051 2aab0310 Info: Loading actions file: /opt/etc/privoxy/easylist.script.action
2012-08-02 16:05:52.477 2aab0310 Info: Loading actions file: /opt/etc/privoxy/easylistgermany.script.action
2012-08-02 16:05:52.631 2aab0310 Info: Loading actions file: /opt/etc/privoxy/easyprivacy.script.action
2012-08-02 16:05:52.829 2aab0310 Info: Loading actions file: /opt/etc/privoxy/fanboy-adblock.script.action
2012-08-02 16:05:53.154 2aab0310 Info: Listening on port 8118 on IP address 192.168.1.1
2012-08-02 16:09:48.135 2e45c690 Error: write to client failed: Operation now in progress

U siebie mam podobne błędy (niestety chyba skrypt nie jest doskonały - trzeba zobaczyć jak z wersją 0.3 - może jest to naprawione). Nie występuje za to u mnie ta ostatnia linijak co u ciebie. Działanie za to schedulera można zobaczyć:

2012-08-02 00:00:16.924 2aab0310 Info: exiting by signal 15 .. bye
2012-08-02 00:00:18.144 2aab0310 Info: Privoxy version 3.0.19
2012-08-02 00:00:18.145 2aab0310 Info: Program name: privoxy
2012-08-02 00:00:18.145 2aab0310 Info: Loading filter file: /opt/etc/privoxy/default.filter
2012-08-02 00:00:18.169 2aab0310 Info: Loading filter file: /opt/etc/privoxy/adblock.script.filter
2012-08-02 00:00:18.169 2aab0310 Error: Adding re_filter job '*[src[/&:?=_]="http://go\.arbopl\.bbelements\.com/logos/"]' to filter adblock failed with error -101.
2012-08-02 00:00:18.170 2aab0310 Info: Loading filter file: /opt/etc/privoxy/adblock-pxf-polish.script.filter
2012-08-02 00:00:18.170 2aab0310 Error: Adding re_filter job 'div[id*="reklam"],div[class="reklam"]' to filter adblock-pxf-polish failed with error 2.
2012-08-02 00:00:18.171 2aab0310 Info: Loading filter file: /opt/etc/privoxy/easylist.script.filter
2012-08-02 00:00:23.102 2aab0310 Error: Adding re_filter job 's|.*||g' to filter easylist failed with error 68.
2012-08-02 00:00:24.358 2aab0310 Info: Loading filter file: /opt/etc/privoxy/easylistgermany.script.filter
2012-08-02 00:00:24.377 2aab0310 Error: Adding re_filter job 'input[onclick[/&:?=_]="window\.open('http://www\.firstload\.de/affiliate/"]' to filter easylistgermany failed with error -101.
2012-08-02 00:00:24.377 2aab0310 Info: Loading filter file: /opt/etc/privoxy/easyprivacy.script.filter
2012-08-02 00:00:24.377 2aab0310 Info: Loading filter file: /opt/etc/privoxy/fanboy-adblock.script.filter
2012-08-02 00:00:24.380 2aab0310 Error: Adding re_filter job 's|onclick[/&:?=_]="window\.open('http://adultfriendfinder\.com/search/">||g' to filter fanboy-adblock failed with error 70.
2012-08-02 00:00:37.380 2aab0310 Error: Adding re_filter job 'A[href[/&:?=_]="http://secure\.hostgator\.com/~affiliat/"]' to filter fanboy-adblock failed with error -101.
2012-08-02 00:00:37.383 2aab0310 Error: Adding re_filter job 'A[href[/&:?=_]="http://www\.dreamhost\.com/r\.cgi?"]' to filter fanboy-adblock failed with error -101.
2012-08-02 00:00:37.390 2aab0310 Error: Adding re_filter job 'div[id[/&:?=_]="ava_"][style="text-align:center;"]' to filter fanboy-adblock failed with error 2.
2012-08-02 00:00:37.409 2aab0310 Error: Adding re_filter job 'a\.ad_policy' to filter fanboy-adblock failed with error -101.
2012-08-02 00:00:37.465 2aab0310 Error: Adding re_filter job 'div[id[/&:?=_]="div-gpt-ad-"]' to filter fanboy-adblock failed with error 2.
2012-08-02 00:00:37.468 2aab0310 Error: Adding re_filter job 'iframe[src[/&:?=_]="http://ad\.yieldmanager\.com/"]' to filter fanboy-adblock failed with error -101.
2012-08-02 00:00:37.468 2aab0310 Info: Loading actions file: /opt/etc/privoxy/match-all.action
2012-08-02 00:00:37.469 2aab0310 Info: Loading actions file: /opt/etc/privoxy/default.action
2012-08-02 00:00:37.509 2aab0310 Info: Loading actions file: /opt/etc/privoxy/user.action
2012-08-02 00:00:37.512 2aab0310 Info: Loading actions file: /opt/etc/privoxy/adblock.script.action
2012-08-02 00:00:37.520 2aab0310 Info: Loading actions file: /opt/etc/privoxy/adblock-pxf-polish.script.action
2012-08-02 00:00:37.526 2aab0310 Info: Loading actions file: /opt/etc/privoxy/easylist.script.action
2012-08-02 00:00:37.748 2aab0310 Info: Loading actions file: /opt/etc/privoxy/easylistgermany.script.action
2012-08-02 00:00:37.827 2aab0310 Info: Loading actions file: /opt/etc/privoxy/easyprivacy.script.action
2012-08-02 00:00:37.933 2aab0310 Info: Loading actions file: /opt/etc/privoxy/fanboy-adblock.script.action
2012-08-02 00:00:38.108 2aab0310 Info: Listening on port 8118 on IP address 192.168.0.100
 
belliash

Cytat

Since secure HTTP connections are encrypted SSL sessions between your browser and the secure site, and are meant to be reliably secure, there is little that Privoxy can do but hand the raw gibberish data though from one end to the other unprocessed.

The only exception to this is blocking by host patterns, as the client needs to tell Privoxy the name of the remote server, so that Privoxy can establish the connection. If that name matches a host-only pattern, the connection will be blocked.

As far as ad blocking is concerned, this is less of a restriction than it may seem, since ad sources are often identifiable by the host name, and often the banners to be placed in an encrypted page come unencrypted nonetheless for efficiency reasons, which exposes them to the full power of Privoxy's ad blocking.


Wiec sens jakis jest, aby filtrowac tresci szyfrowane. O ile privoxy to potrafi, o tyle dziala to marnie, bo nawet glupi google z http przekierowuje na https i dziala zdecydowanie wolniej.


BTW: Probowales instalowac to na optware? Tam jest starsza wersja privoxy - 3.0.16, ew moze zainstalowac te 3.0.19 z entware pod optware? Pytam bo entware nie udostepnia hplip, w odroznieniu od optware a ten pakiet jest mi niezbedny do uruchomienia skanera sieciowego przy wspolpracy z xinetd. Chociaz entware bardziej przypadlo mi do gustu.
 
lazik

Cytat

belliash napisał(a):

Cytat

Since secure HTTP connections are encrypted SSL sessions between your browser and the secure site, and are meant to be reliably secure, there is little that Privoxy can do but hand the raw gibberish data though from one end to the other unprocessed.

The only exception to this is blocking by host patterns, as the client needs to tell Privoxy the name of the remote server, so that Privoxy can establish the connection. If that name matches a host-only pattern, the connection will be blocked.

As far as ad blocking is concerned, this is less of a restriction than it may seem, since ad sources are often identifiable by the host name, and often the banners to be placed in an encrypted page come unencrypted nonetheless for efficiency reasons, which exposes them to the full power of Privoxy's ad blocking.


Wiec sens jakis jest, aby filtrowac tresci szyfrowane. O ile privoxy to potrafi, o tyle dziala to marnie, bo nawet glupi google z http przekierowuje na https i dziala zdecydowanie wolniej.


BTW: Probowales instalowac to na optware? Tam jest starsza wersja privoxy - 3.0.16, ew moze zainstalowac te 3.0.19 z entware pod optware? Pytam bo entware nie udostepnia hplip, w odroznieniu od optware a ten pakiet jest mi niezbedny do uruchomienia skanera sieciowego przy wspolpracy z xinetd. Chociaz entware bardziej przypadlo mi do gustu.

Napis zdo kolegi http://openlinksys.info/profile.php?lookup=27613 on opiekuje się repo dla entware i ostatni na moją prośbę dodał ntpd.
 
belliash
Jesli mialbym porownac filtrowanie w privoxy do adblock'a w firefoxie, to ten 2 jest zdecydowanie lepszy. Ustawilem identyczne filtry w obu i efekty sa nastepujace:

1) Privoxy nie wycina wszystkich reklam (sa np na wp.pl, openrouter.info)
2) Czasami privoxy wycina jakas reklame i w jej miejscu pojawia sie link do jej przywrocenia, czasami tego linku nie ma - przyklad reklama na openlinksys.info - wycina wszystko i nie wstawia linku)
3) Na niektorych stronach ucina flasha lacznie z umieszczonego nad nim reklamami (np http://tetris.com.pl/game/27/Choco%20Tetris.html).
4) Spowalnia bardzo strony szyfrowane (SSL)

W przypadku skorzystania z adblocka, zarowno wszystkie reklamy sa ucinane, jak i uklad strony jest zmieniany (bo po co puste miejsce; ew mozna to zmienic) i ostatecznie nie blokuje tresci ktore nas interesuja, jak wspomniany flash z gra.
Rozwiazanie w postaci transparentnego proxy jak najbardziej na plus, ale privoxy sobie z tym do konca nie radzi niestety.


BTW: Mozna by sie jeszcze pobawic squidem z addzapperem Pfft
Edytowany przez belliash dnia 03-08-2012 11:44
 
orcad
witam
nie chce zakładać osobny temat ,mam pytanie spierałem sie tym tutorialem!
zrobiłem tak jak jest napisane :

Cytat

root@Linksys-E4200:/opt# /opt/etc/init.d/S24privoxy start
root@Linksys-E4200:/opt# ps|grep -v grep|grep "privoxy /opt/etc/privoxy/config"|wc R11;l
root@Linksys-E4200:/opt# 0 0 0


jak ustawie na port 8118 i ip ten sam co na router ja mam 192.168.1.1 i tam mam w konfiguracja mam błąd połączenia !!

czy mogę liczyć na wskazówkę?
Asus RT-N18U DD-WRT v3.0-r28598 std
Synology DS412+ [1 TB WD RED]
 
belliash
Pokaz plik z logami, byc moze jest tam blad i usluga nie startuje.

To polecenie jest bledne - zawsze zwraca mi 0 0 0, zamiast niego wpisz poprostu ps | grep privoxy
 
lazik

Cytat

belliash napisał(a):

Pokaz plik z logami, byc moze jest tam blad i usluga nie startuje.

To polecenie jest bledne - zawsze zwraca mi 0 0 0, zamiast niego wpisz poprostu ps | grep privoxy

A tam błędne. Jak się wkleja z Worda w którym to pisałem na forum to takie kwiatki wychodzą:

ps|grep -v grep|grep "privoxy /opt/etc/privoxy/config"|wc -l
 
Przejdź do forum
Zaloguj
Wprowadź adres e-mail lub nazwę użytkownika

Hasło



Nie masz jeszcze konta? Zarejestruj się.

Zapomniałeś/aś hasła?
Aktualnie online
· Gości online: 16

· Użytkowników online: 0

· Łącznie użytkowników: 24,115
· Najnowszy użytkownik: Ja
Czat
Musisz się zalogować, aby opublikować wiadomość.

Adooni
26-04-2024 14:41
jaki router RMerlin nie pociagne, tomato/ openwrt tak non hilink,

tamtosiamto
23-04-2024 12:35
modem bez smilocka?

man1
22-04-2024 23:27
Czy próbował ktoś uzywac karty voice (z nolimit GB) od tmobile w modemie /routerze? Da się jakoś to zrobić? Bo u mnie neta brak. E3372 Sad

tamtosiamto
31-03-2024 12:54
Wesolego jajka wszytskim forumowiczom Grin

tamtosiamto
28-03-2024 23:24
tak, tak zgadza sie, ale ja pytam o wykluczenie noda na guest network w first set, i to nie dziala

Adooni
24-03-2024 13:16
Guest network is currently designed to allow the first set of each band (2.4G, 5G, 5G-1) available to the AiMesh node

tamtosiamto
24-03-2024 03:03
ale w 1 jest opcja do wyboru - dla calej sieci albo rutera only i wlasnie o tym mowie, ze nie dziala

Adooni
23-03-2024 16:31
w dokumencie asusa jest ze wlasnie dla 1 ma dzialac na nodach tez

tamtosiamto
23-03-2024 15:39
tak, ale nie zmienia to faktu, ze w pierwszej nie dziala wylaczanie aimesh dla goscinnej( a powinno), czyli jest jakis bug. Mam start soft, bo to dsl-ac68 ktory nie jest juz updateowany

Adooni
22-03-2024 18:07
nie, 1 wsza bedzie wszedzie trzeba 2ga zrobic dla kazdego pasma te nie sa przenoszone

71,585,148 unikalnych wizyt