The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



Создать новую тему
 - Свернуть нити
Пометить прочитанным
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Архив | Избранное | Мое | Новое | | |  
Форум Настройка Squid, Tor и прокси серверов
Outlook Express откат и синхронизация, !*! GleoDolgin, (Разное) 13-Янв-18, 19:17  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Народ, кто поможет в настройках Outlook-а? После смены клиента и переноса базы не получается настроить почему-то.....пропали письма в папке входящие.
Outlook использует настройки прокси сервера, которые заданы в Internet Explorer.
В Internet Explorer делаю: Сервис\Подключения\Настройка сети. Указываю айпишник сервака и открытый порт.
Хотя тут скорее всего дело в локальном файле.
Проблема с использованием acl типа max_user_ip, !*! Александр, (ACL, блокировки) 15-Сен-17, 11:58  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Имеется прокси-сервер (squid 2.7) для порядка 2000 пользователей. Большинству из них разрешен вход только с 1 ip-адреса.
Если использовать динамическую привязку ip-адреса к имени пользователя с помощью конструкции вида:
acl limit-1 max_user_ip -s 1
acl ip-limit-1 proxy_auth "/путь к списку имен пользователей"
http_access deny ip-limit-1 limit-1
то проблем нет, если с этим именем пользователя не пытаются зайти с 2-х компов одновременно. Например, пользователь перешел на новое рабочее место, а на старом компе не удалил сохраненные логин/пароль в броузере. Для разрешения такой ситуации добавлено:
external_acl_type BLOCK_USER_IP ...
acl BLOCK_USER_IP external BLOCK_USER_IP %SRC %LOGIN
http_access deny BLOCK_USER_IP
Проблема заключается в следующем - хотя пользователя на старом адресе прокси-сервер и не пускает, но в cache.log появляется запись:
2017/09/15 09:27:49| authenticateAuthUserRequestSetIp: user 'test' has been seen at a new IP address (10.41.77.74)
при этом его адрес привязывается к имени, и на новом месте пользователя не пускает:
2017/09/15 10:25:46| authenticateAuthUserRequestSetIp: user 'test' has been seen at a new IP address (10.4.113.253)
2017/09/15 10:25:46| aclMatchUserMaxIP: user 'test' tries to use too many IP addresses (max 1 allowed)!

Очевидно, что плюнуть адрес в таблицу squid успевает на этапе proxy_auth. Это реальная проблема, поскольку ночью не работают, все таблицы успевают очиститься, и если первым успевает засветиться неправильный адрес, то у легитимного пользователя не получается авторизоваться. Есть ли какой-то способ решить проблему, кроме недопуска через прокси по ip-адресу без %LOGIN?

Символ ^@ в логах, !*! Перспективный, (Учет работы пользователей, логи) 12-Сен-17, 13:28  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Привет. squid_3.5.23
Переодически в логах при слишком длинном url, который обрезается самим squid-ом, в конце обрезанной строки появляется символ ^@ (именно одиночный символ, в редакторе 000 0x000) и приклеивается следующая строка
Вот как выглядит
>1501546393.534      7 10.0.4.4 TAG_NONE/400 33447 GET http://index.b2bcontext.ru/service/very-long-url^@1501546393.663    134 10.0.4.4 TCP_MISS/200 2052 GET http://normal-size-url normal fields

Обработчик лога неверно трактует данные из этой строки. Хочется исправить это дело.

Как такого избежать такого поведения в логе или как хотя бы  заменить этот одиночный символ ^@ на перевод строки?
Пробую:
sed -i 's|^@|\n|'
sed: -e выражение #1, символ 0: нет предыдущего регулярного выражения
или так
sed -i 's|\^@|\n|'
sed: -e выражение #1, символ 7: незавершенная команда `s'


Файл Netdb.state , !*! G7agol, (Учет работы пользователей, логи) 07-Сен-17, 08:41  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Добрый день!
На сервере Squid в папке /var/log/squid3 лежит файл netdb.state Он весит 5.5 Гб.
Содержание примерно такое:

173.252.88.0 1 1   62.00000  291.00000 1445809914 1445809614 graph.facebook.com
178.63.73.0 1 1   19.00000   78.00000 1445810576 1445810278 forum.ipfire.org
216.58.209.0 1 1   18.00000   35.00000 1445810637 1445810337 translate.google.ru
198.41.215.0 1 1   14.00000   83.00000 1445810411 1445810111 cdnjs.cloudflare.com
64.233.162.0 1 1   25.00000   31.00000 1445810576 1445810276 fonts.googleapis.com

Можно ли его удалять? Или почистить его удалением текста внутри.

Version 3.5.12 прозрачный, не пускает на ютуб, !*! Andrey, (Прозрачный proxy) 25-Авг-17, 14:30  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Привет!
Проблема не могу понять в чём дело не пускает на ютуб, хотя другие сайты (https) работают.
Version 3.5.12 прозрачный.
http_port 192.168.50.1:3128 intercept options=NO_SSLv3:NO_SSLv2
https_port 192.168.50.1:3129 intercept ssl-bump options=ALL:NO_SSLv3:NO_SSLv2 connection-auth=off
cert=/etc/squid/squidCA.pem
Запретить домен, но пускать по прямым ссылкам этого домена, !*! iVladimir86, (ACL, блокировки) 12-Авг-17, 10:23  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Здравствуйте. Интересует следующее. Как в squid настроить правила (директивы) что-бы он пускал
По определенной ссылке в yourube или в определенные плэйлисты, но не пускал в корень сайта и не позволял искать другие ролики соответственно. Только набор ссылок определённых роликов.
Гугл не помог ни русский ни забугорный.
Очень интересно можно ли вообще так сделать?
SQUID + WCC2 Не работает фильтрация по HTTPS, !*! snik, (Прозрачный proxy) 23-Июн-17, 16:43  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Доброго дня.

Может кто сталкивался с такой проблемой. Уже месяц бьюсь, решить не могу.

Есть cisco по wccp2 подключенная к серверу на FreeBSD 11.0 с установленным SQUID.
SQUID выполняет фильтрацию.
CISCO в соответствии с Access-list заворачивает по IP нужные сайты на squid
По HTTP фильтрует отлично. А по HTTPS не работает. Не пропускает все пришедшие запросы от  cisco на HTTPS.

#squid -v
Squid Cache: Version 3.5.23
Service Name: squid
configure options:  '--with-default-user=squid' '--bindir=/usr/local/sbin' '--sbindir=/usr/local/sbin' '--datadir=/usr/local/etc/squid' '--libexecdir=/usr/local/libexec/squid' '--localstatedir=/var' '--sysconfdir=/usr/local/etc/squid' '--with-logdir=/var/log/squid' '--with-pidfile=/var/run/squid/squid.pid' '--with-swapdir=/var/squid/cache' '--without-gnutls' '--enable-auth' '--enable-zph-qos' '--enable-build-info' '--enable-loadable-modules' '--enable-removal-policies=lru heap' '--disable-epoll' '--disable-linux-netfilter' '--disable-linux-tproxy' '--disable-translation' '--disable-arch-native' '--enable-eui' '--enable-cache-digests' '--enable-delay-pools' '--disable-ecap' '--disable-esi' '--enable-follow-x-forwarded-for' '--enable-htcp' '--enable-icap-client' '--enable-icmp' '--enable-ident-lookups' '--enable-ipv6' '--enable-kqueue' '--with-large-files' '--enable-http-violations' '--without-nettle' '--enable-snmp' '--enable-ssl' '--with-openssl=/usr/local' 'LIBOPENSSL_CFLAGS=-I/usr/local/include' 'LIBOPENSSL_LIBS=-lcrypto -lssl' '--enable-ssl-crtd' '--disable-stacktraces' '--enable-forw-via-db' '--enable-wccp' '--enable-wccpv2' '--without-heimdal-krb5' '--without-mit-krb5' '--without-gss' '--disable-ipf-transparent' '--enable-ipfw-transparent' '--disable-pf-transparent' '--without-nat-devpf' '--enable-auth-basic=DB SMB_LM MSNT-multi-domain NCSA PAM POP3 RADIUS fake getpwnam NIS' '--enable-auth-digest=file' '--enable-external-acl-helpers=file_userip time_quota unix_group' '--enable-auth-negotiate=none' '--enable-auth-ntlm=fake smb_lm' '--enable-storeio=aufs diskd rock ufs' '--enable-disk-io=DiskThreads DiskDaemon AIO Blocking IpcIo Mmapped' '--enable-log-daemon-helpers=file' '--enable-url-rewrite-helpers=fake' '--enable-storeid-rewrite-helpers=file' '--prefix=/usr/local' '--mandir=/usr/local/man' '--disable-silent-rules' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd11.0' 'build_alias=amd64-portbld-freebsd11.0' 'CC=cc' 'CFLAGS=-O2 -pipe  -fstack-protector -fno-strict-aliasing' 'LDFLAGS= -pthread -Wl,-rpath,/usr/local/lib -fstack-protector' 'LIBS=' 'CPPFLAGS=' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -fstack-protector -fno-strict-aliasing  -Wno-unknown-warning-option -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -Wno-dynamic-class-memaccess' 'CPP=cpp' --enable-ltdl-convenience


squid.conf:

cache_effective_user squid
cache_effective_group squid

visible_hostname reestr-proxy

#debug_options ALL,5

http_port 192.168.2.230:9090

http_port 192.168.2.230:3128 intercept
https_port 192.168.2.230:3129 intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/usr/local/etc/squid/squ

always_direct allow all

acl ssl_sites ssl::server_name "/var/db/zapret-info/denied_https.conf"
acl step1 at_step SslBump1
acl step2 at_step SslBump2
ssl_bump peek step1
ssl_bump bump ssl_sites
ssl_bump splice all
sslproxy_cert_error allow all
sslproxy_options NO_SSLv2,NO_SSLv3,SINGLE_ECDH_USE
sslproxy_options ALL
sslproxy_cipher ALL
sslcrtd_program /usr/local/libexec/squid/ssl_crtd -s /var/squid/ssl_db -M 4MB

icp_port 0
#hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
cache_mem 1 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 1 KB
maximum_object_size_in_memory 50 KB
cache_replacement_policy heap LFUDA
cache_dir ufs /var/squid/cache 1 1 1 no-store
logfile_rotate 7
dns_nameservers 8.8.8.8
hosts_file /etc/hosts
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
quick_abort_min 0 KB
quick_abort_max 0 KB
half_closed_clients off
acl purge method PURGE
acl CONNECT method CONNECT
acl SSL_ports port 16869
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 8001
acl Safe_ports port 81
acl Safe_ports port 888
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow all
http_reply_access allow all
icp_access allow all
cache_mgr root@server.ru
memory_pools off
log_icp_queries off
cachemgr_passwd q1w2e3r4 all
client_db off
buffered_logs on

wccp2_router 192.168.2.229

wccp2_rebuild_wait on

wccp2_forwarding_method 2

wccp2_return_method 2

wccp2_assignment_method 1

wccp2_service dynamic 0
wccp2_service_info 0 protocol=tcp flags=dst_ip_hash,dst_port_hash priority=240 ports=80,8001,8080,8081,81,888
wccp2_service dynamic 70
wccp2_service_info 70 protocol=tcp flags=dst_ip_hash,dst_port_hash priority=240 ports=16869,443

wccp2_address 192.168.2.230

redirect_program /usr/local/etc/squid/redirector.pl
url_rewrite_children 60 startup=10 idle=1 concurrency=0


/var/log/squid/cache.log:

2017/06/22 23:54:18 kid1| Current Directory is /var/squid
2017/06/22 23:54:18 kid1| Starting Squid Cache version 3.5.23 for amd64-portbld-freebsd11.0...
2017/06/22 23:54:18 kid1| Service Name: squid
2017/06/22 23:54:18 kid1| Process ID 16050
2017/06/22 23:54:18 kid1| Process Roles: worker
2017/06/22 23:54:18 kid1| With 1171206 file descriptors available
2017/06/22 23:54:18 kid1| Initializing IP Cache...
2017/06/22 23:54:18 kid1| DNS Socket created at [::], FD 6
2017/06/22 23:54:18 kid1| DNS Socket created at 0.0.0.0, FD 7
2017/06/22 23:54:18 kid1| Adding nameserver 92.50.201.2 from squid.conf
2017/06/22 23:54:18 kid1| helperOpenServers: Starting 5/32 'ssl_crtd' processes
2017/06/22 23:54:18 kid1| helperOpenServers: Starting 10/60 'redirector.pl' processes
2017/06/22 23:54:18 kid1| Logfile: opening log daemon:/var/log/squid/access.log
2017/06/22 23:54:18 kid1| Logfile Daemon: opening log /var/log/squid/access.log
2017/06/22 23:54:18 kid1| Unlinkd pipe opened on FD 45
2017/06/22 23:54:18 kid1| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2017/06/22 23:54:18 kid1| Store logging disabled
2017/06/22 23:54:18 kid1| Swap maxSize 1024 + 1024 KB, estimated 157 objects
2017/06/22 23:54:18 kid1| Target number of buckets: 7
2017/06/22 23:54:18 kid1| Using 8192 Store buckets
2017/06/22 23:54:18 kid1| Max Mem  size: 1024 KB
2017/06/22 23:54:18 kid1| Max Swap size: 1024 KB
2017/06/22 23:54:18 kid1| Rebuilding storage in /var/squid/cache (clean log)
2017/06/22 23:54:18 kid1| Using Least Load store dir selection
2017/06/22 23:54:18 kid1| Current Directory is /var/squid
2017/06/22 23:54:18 kid1| Finished loading MIME types and icons.
2017/06/22 23:54:18 kid1| Accepting WCCPv2 messages on port 2048, FD 48.
2017/06/22 23:54:18 kid1| Initialising all WCCPv2 lists
2017/06/22 23:54:18 kid1| HTCP Disabled.
2017/06/22 23:54:18 kid1| Pinger socket opened on FD 53
2017/06/22 23:54:18 kid1| Squid plugin modules loaded: 0
2017/06/22 23:54:18 kid1| Adaptation support is off.
2017/06/22 23:54:18 kid1| Accepting HTTP Socket connections at local=192.168.2.230:9090 remote=[::] FD 49 flags=9
2017/06/22 23:54:18 kid1| Accepting NAT intercepted HTTP Socket connections at local=192.168.2.230:3128 remote=[::] FD 50 flags=41
2017/06/22 23:54:18 kid1| Accepting NAT intercepted SSL bumped HTTPS Socket connections at local=192.168.2.230:3129 remote=[::] FD 51 flags=
2017/06/22 23:54:18 kid1| Done reading /var/squid/cache swaplog (0 entries)
2017/06/22 23:54:18 kid1| Store rebuilding is 0.00% complete
2017/06/22 23:54:18 kid1| Finished rebuilding storage from disk.
2017/06/22 23:54:18 kid1|         0 Entries scanned
2017/06/22 23:54:18 kid1|         0 Invalid entries.
2017/06/22 23:54:18 kid1|         0 With invalid flags.
2017/06/22 23:54:18 kid1|         0 Objects loaded.
2017/06/22 23:54:18 kid1|         0 Objects expired.
2017/06/22 23:54:18 kid1|         0 Objects cancelled.
2017/06/22 23:54:18 kid1|         0 Duplicate URLs purged.
2017/06/22 23:54:18 kid1|         0 Swapfile clashes avoided.
2017/06/22 23:54:18 kid1|   Took 0.03 seconds (  0.00 objects/sec).
2017/06/22 23:54:18 kid1| Beginning Validation Procedure
2017/06/22 23:54:18 kid1|   Completed Validation Procedure
2017/06/22 23:54:18 kid1|   Validated 0 Entries
2017/06/22 23:54:18 kid1|   store_swap_size = 0.00 KB
2017/06/22 23:54:18| pinger: Initialising ICMP pinger ...
2017/06/22 23:54:18| pinger: ICMP socket opened.
2017/06/22 23:54:18| pinger: ICMPv6 socket opened
2017/06/22 23:54:19 kid1| storeLateRelease: released 0 objects

При этом /var/squid/ssl_db:
index.txt  0
size       1
каталог certs - пустой


#sockstat -4 | grep 3129
squid    squid      16050 51 tcp4   192.168.2.230:3129    *:*
#sockstat -4 | grep 3128
squid    squid      16050 50 tcp4   192.168.2.230:3128    *:*


# ipfw list
00050 fwd 192.168.2.230,3128 tcp from not me to any dst-port 80 via igb1 in
00050 fwd 192.168.2.230,3128 tcp from not me to any dst-port 8001 via igb1 in
00050 fwd 192.168.2.230,3128 tcp from not me to any dst-port 8080 via igb1 in
00050 fwd 192.168.2.230,3128 tcp from not me to any dst-port 8081 via igb1 in
00050 fwd 192.168.2.230,3128 tcp from not me to any dst-port 81 via igb1 in
00050 fwd 192.168.2.230,3128 tcp from not me to any dst-port 888 via igb1 in
00050 fwd 192.168.2.230,3129 tcp from not me to any dst-port 16869 via igb1 in
00050 fwd 192.168.2.230,3129 tcp from not me to any dst-port 443 via igb1 in

Не стартует squidguard, !*! sasha198407, (Подключение фильтров) 23-Июн-17, 09:48  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Доброго времени суток. Поставил на CentOS7 связку sams2+squid3.3.8 +SquidGuard: 1.4 Berkeley DB 5.3.21. Самс и сквид работают нормально, а вот скуидГуард почему-то не отрабатывает. Посмотрел статус.
# systemctl status squidGuard.service
● squidGuard.service - Squid Internet Object Cache and squidGuard web filter
   Loaded: loaded (/usr/lib/systemd/system/squidGuard.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2017-05-24 14:06:17 MSK; 16s ago
  Process: 1803 ExecStart=/usr/bin/squidGuard-helper start (code=exited, status=6)

May 24 14:06:17 fw.domain.local systemd[1]: Starting Squid Internet Object Cache and squidGuard web filter...
May 24 14:06:17 fw.domain.local squidGuard-helper[1803]: Starting squid: [FAILED]
May 24 14:06:17 fw.domain.local systemd[1]: squidGuard.service: control process exited, code=exited status=6
May 24 14:06:17 fw.domain.local systemd[1]: Failed to start Squid Internet Object Cache and squidGuard web filter.
May 24 14:06:17 fw.domain.local systemd[1]: Unit squidGuard.service entered failed state.
May 24 14:06:17 fw.domain.local systemd[1]: squidGuard.service failed.

Из строки

Failed to start Squid Internet Object Cache and squidGuard web filter.

делаю вывод, что squidGuard-helper пытается запустить squid и squidguard. Но т.к. squid уже запущен, то он его не стартует, а следом и не стартует squidguard. Если я ошибся, то поправьте. Ниже привожу squidGuard-helper


#!/bin/bash

PATH=/usr/bin:/sbin:/bin:/usr/sbin
export PATH

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ !${NETWORKING} = "yes" ] && exit 0

# check if the squid-squidGuard.conf file is present
[ -f /etc/squid/squid-squidGuard.conf ] || exit 0

if [ -f /etc/sysconfig/squid ]; then
  . /etc/sysconfig/squid
fi

# don't raise an error if the config file is incomplete
# set defaults instead:
SQUID_OPTS=${SQUID_OPTS:-"-D"}
SQUID_PIDFILE_TIMEOUT=${SQUID_PIDFILE_TIMEOUT:-20}
SQUID_SHUTDOWN_TIMEOUT=${SQUID_SHUTDOWN_TIMEOUT:-100}

# determine the name of the squid binary
[ -f /usr/sbin/squid ] && SQUID=squid
[ -z "$SQUID" ] && exit 0

prog="$SQUID"

# determine which one is the cache_swap directory
CACHE_SWAP=`sed -e 's/#.*//g' /etc/squid/squid-squidGuard.conf | \
        grep cache_dir |  awk '{ print $3 }'`
[ -z "$CACHE_SWAP" ] && CACHE_SWAP=/var/spool/squid

RETVAL=0

start() {
    for adir in $CACHE_SWAP; do
        if [ ! -d $adir/00 ]; then
             echo -n "init_cache_dir $adir... "
             $SQUID -f /etc/squid/squid-squidGuard.conf -z -F -D 2>/dev/null
        fi
    done
    echo -n $"Starting1 $prog: "
    $SQUID $SQUID_OPTS -f /etc/squid/squid-squidGuard.conf 2> /dev/null
###   $SQUID_OPTS -f /etc/squid/squid-squidGuard.conf 2> /dev/null
   RETVAL=$?
    if [ $RETVAL -eq 0 ]; then
       timeout=0;
       while : ; do
          [ ! -f /var/run/squid.pid ] || break
          if [ $timeout -ge $SQUID_PIDFILE_TIMEOUT ]; then
             RETVAL=1
             break
          fi
          sleep 1 && echo -n "."
          timeout=$((timeout+1))
       done
    fi
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$SQUID
    [ $RETVAL -eq 0 ] && echo_success
    [ $RETVAL -ne 0 ] && echo_failure
    echo
    return $RETVAL
}

stop() {
    echo -n  $"Stopping $prog: "
    $SQUID -k check -f /etc/squid/squid-squidGuard.conf >/dev/null 2>&1
    RETVAL=$?
    if [ $RETVAL -eq 0 ] ; then
        $SQUID -k shutdown -f /etc/squid/squid-squidGuard.conf &
        rm -f /var/lock/subsys/$SQUID
        timeout=0
        while : ; do
                [ -f /var/run/squid.pid ] || break
                if [ $timeout -ge $SQUID_SHUTDOWN_TIMEOUT ]; then
                    echo
                    return 1
                fi
                sleep 2 && echo -n "."
                timeout=$((timeout+2))
        done
        echo_success
        echo
    else
        echo_failure
        echo
    fi
    return $RETVAL
}

reload() {
    $SQUID $SQUID_OPTS -k reconfigure -f /etc/squid/squid-squidGuard.conf
}

restart() {
    stop
    start
}

condrestart() {
    [ -e /var/lock/subsys/squid ] && restart || :
}

rhstatus() {
    status $SQUID
    $SQUID -k check -f /etc/squid/squid-squidGuard.conf
}

probe() {
    return 0
}

case "$1" in
start)
    start
    ;;

stop)
    stop
    ;;

#reload)
#    reload
#    ;;
#
#restart)
#    restart
#    ;;
#
#condrestart)
#    condrestart
#    ;;
#
#status)
#    rhstatus
#    ;;
#
#probe)
#    exit 0
#    ;;

*)
#    echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
    exit 1
esac

exit $?

Где, что поправить, что бы заработало. Заранее всем спасибо.

Freebsd 11.0+squid intercept+ssl_bump(only SNI) Кто делал?, !*! techbird, (Прозрачный proxy) 21-Май-17, 18:35  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Всем доброго дня суток, собственно есть производственная необходимость в приготовлении сквида по схеме {ipfw+https+intercept+ssl_bump - без подмены сертификата, только SNI для блокировки сайтов} Буду рад если поделитесь рецептами.
Некорректная работа SQUID, !*! gunz, (Squid) 18-Май-17, 14:05  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Есть Ubuntu Server 16. Поставил SQUID, настроил. Все работает. НО работает только в мозиле. В хроме и опере открывает не все сайты. Например яндекс\вк не открывает. Никаких ошибок. Просто бесконечно грузит. Но если дописать в строке https://www.(https://www.vk.com например) то сразу заходит. Подскажите пожалуйста где копать и что сделать?
Прозрачный прокси ssl по белым спискам некорректное отображение, !*! Михаил, (Прозрачный proxy) 17-Май-17, 10:00  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Здравствуйте товарищи! Помогите решить проблему и направить на путь праведный!
Система - FreeBSD 11, squid - 3.5.25
Squid настроил в прозрачном режиме, вот конфиг:

visible_hostname squid
dns_nameservers  10.86.31.254

acl localnet src 192.168.100.0/24    # RFC1918 possible internal network

acl SSL_ports  port 443
acl Safe_ports port 80        # http
acl Safe_ports port 21        # ftp
acl Safe_ports port 443        # https
acl Safe_ports port 70        # gopher
acl Safe_ports port 210        # wais
acl Safe_ports port 1025-65535    # unregistered ports
acl Safe_ports port 280        # http-mgmt
acl Safe_ports port 488        # gss-http
acl Safe_ports port 591        # filemaker
acl Safe_ports port 777        # multiling http
acl CONNECT method CONNECT

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localnet CONNECT

acl admins src 192.168.100.13 192.168.100.10

acl white_list url_regex -i "/usr/local/etc/squid/white_list"

acl administration src "/usr/local/etc/squid/lists/administration"

acl pupils_215 src "/usr/local/etc/squid/lists/pupils_215"

http_access allow admins
http_access allow administration
http_access allow white_list pupils_215

http_access deny all

http_port 127.0.0.1:3128 intercept options=NO_SSLv3:NO_SSLv2
https_port 127.0.0.1:3129 intercept ssl-bump options=ALL:NO_SSLv3:NO_SSLv2 connection-auth=off cert=/usr/local/etc/squid/squidCA.pem

always_direct allow all
sslproxy_cert_error allow all
sslproxy_flags DONT_VERIFY_PEER

acl white_list_ssl ssl::server_name_regex "/usr/local/etc/squid/white_list"
acl step1 at_step SslBump1
ssl_bump peek step1
ssl_bump terminate !white_list_ssl !admins
ssl_bump splice all

sslcrtd_program /usr/local/libexec/squid/ssl_crtd -s /var/db/ssl_db -M 4MB

error_directory /usr/local/etc/squid/errors/ru

coredump_dir /var/squid/cache
cache deny all

pid_filename /var/run/squid/squid.pid


refresh_pattern ^ftp:        1440    20%    10080
refresh_pattern ^gopher:    1440    0%    1440
refresh_pattern -i (/cgi-bin/|\?) 0    0%    0
refresh_pattern .        0    20%    4320

Работает все хорошо, все как надо. Админов и администрацию пускает куда угодно. Учеников пускает только на сайты из белого списка, но есть одно большое НО! Некоторые сайты(в белом списке) отображаются не полностью. К примеру gosuslugi.ru. Для этого сайта нужно добавить в белый список сайт gu-st.ru, но это я узнал из интернета(считаем, что пока я его не добавил). При попытки открыть сайт госуслуг в access.log пишет такое:

1495003400.855  24433 192.168.100.44 TCP_TUNNEL/200 18256 CONNECT www.gosuslugi.ru:443 - ORIGINAL_DST/109.207.1.97 -
1495003400.866      5 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.97:443 - HIER_NONE/- -
1495003401.096      4 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.096      5 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.098      4 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.100      4 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.102      9 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.113     11 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.124      4 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.126      5 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.133      8 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.137      8 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.144      7 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.147      6 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.152      8 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.171      6 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.174      2 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.183      4 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.203      2 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.211      2 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.221      2 192.168.100.44 TAG_NONE/200 0 CONNECT 109.207.1.34:443 - HIER_NONE/- -
1495003401.241      2 192.168.100.44 TAG_NONE/200 0 CONNECT 5.143.224.43:443 - HIER_NONE/- -

Начну с конца. ip 5.143.224.43 - мне не понятный и даже не пингуется! ip 109.207.1.34 - nslookup говорит что это mail.gas-u.ru, я его добавляю в белый список и ничего!! А при попытке пингануть gu-st.ru выдает туже айпишку, что и для mail.gas-u.ru. То есть как мне узнать что мне нужно конкретно добавить сайт gu-st.ru в белый список я не понял.

Из этого вытекает другой вопрос, мне нужно для каждого такого сайта добавлять нужные им доменные имена?
Тот же некорректно отображаемый habrahabr.ru в access.log выдает кучу ip адресов которые не понятны для nslookup.

Сам вопрос! Как мне сделать так, чтобы сайты из белого списка подтягивали все что им нужно от куда угодно и все хорошо отображалось?

Проблема с установкой Squid, !*! a0n78, (Squid) 18-Апр-17, 10:03  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"

Ставлю squid root@ubuntu:~# sudo apt-get install squid Чтение списков пакетов… Готово Построение дерева зависимостей Чтение информации о состоянии… Готово Предлагаемые пакеты: squidclient squid-cgi squid-purge smbclient winbindd НОВЫЕ пакеты, которые будут установлены: squid обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 17 пакетов не обновлено. Необходимо скачать 0 B/2 317 kB архивов. После данной операции, объём занятого дискового пространства возрастёт на 7 643 kB. Выбор ранее не выбранного пакета squid. (Чтение базы данных … на данный момент установлен 61681 файл и каталог.) Подготовка к распаковке …/squid_3.5.12-1ubuntu7.3_amd64.deb … Распаковывается squid (3.5.12-1ubuntu7.3) … Обрабатываются триггеры для man-db (2.7.5-1) … Обрабатываются триггеры для systemd (229-4ubuntu16) … Обрабатываются триггеры для ureadahead (0.100.0-19) … Обрабатываются триггеры для ufw (0.35-0ubuntu2) … Настраивается пакет squid (3.5.12-1ubuntu7.3) … Skipping profile in /etc/apparmor.d/disable: usr.sbin.squid root@ubuntu:~# Skipping profile in /etc/apparmor.d/disable: usr.sbin.squid

Иду в /etc/squid/.........внутри ничего нет ??? Почему нет squid.conf ???

root@ubuntu:~# whereis squid
squid: /usr/sbin/squid /usr/lib/squid /etc/squid /usr/share/squid /usr/share/man/man8/squid.8.gz

Объясните про права, !*! GlooM, (Разное) 18-Мрт-17, 20:40  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Вопрос №1.
Имеется прокси сервер squid на операционке Ubuntu Server 16.04. Захотел поменять каталог, куда будут вываливаться логи со стандартного /var/log/squid на просто /LOGS. Соответственно, создал данную папку, сменил ей овнера на proxy (учетка из под которой работает squid) и для верности назначил права 777. Результат - не стартует! Говорит пермишен денайд!!! Нагуглил похожую проблему, где был совет сделать chmod a+x на каталог логов. Попробовал - заработало! Что это за уличная магия такая????!!! Ведь 777 должно итак давать все разрешения кому угодно!

Вопрос №2.
squid -k rotate ротейтит аксес логи, а кэш.лог остается не тронутым. Как быть? На 14-й убунте ротейтились все логи.

Поиск прокси скрвера со своими требываниями, !*! evg8281, (Другие proxy) 14-Мрт-17, 20:51  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Всем привет!
Есть организация примерно 200 машинами, большинство в домене, четверть в раб. группах (те, что не в домене в одной под сети но, с узким каналом связи (по этому не в домене)). В данный момент прокси сервер настроен на прозрачном Трафик Инспекторе с авторизацией по MAC адресам на WinSRV2008r2. Ищу бесплатную альтернативу Трафик Инспектору без настроек прокси браузера с авторизацией (в альтернативе) по MAC'ам (предпочтительней), IP адресам, AD, с возможностью фильтровать контент http https, по подразделам сайтов (там форумы соц сети порно майлы игровые и т.д.), с возможностью фильтровать потоковое видео аудио. Больше склонен к UNIX системам типа CentOS (есть маленький опыт настройки UNIX систем), пробовал настраивать squid+sams+rejik, но как только дошел до прозрачности, сразу все упало, ибо не хочется к каждому пользователю бегать настраивать прокси сервер в разного рода программах (не только браузерах).
Помогите разобраться где накосячил  , !*! gimm, (Squid) 26-Фев-17, 20:47  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Установил squid через webmin (прошу не закидать тазами ) , ставил на ununtu , последней стабильной версии , но при попытки инициализации кеша пришет  " Каталоги кэша Squid /hdd1, /ssd1, /hdd2, /ssd2, /hdd3, /ssd3 не были инициализированы.Это должно быть сделано до запуска Squid." Делаю , но происходит "FATAL: Bungled /etc/squid/squid.conf line 3468: cache_dir rock /hdd1 ... min-size=100000
Squid Cache (Version 3.5.12): Terminated abnormally.
CPU Usage: 0.004 seconds = 0.004 user + 0.000 sys
Maximum Resident Size: 159024 KB
Page faults with physical i/o: 0"
Редактировал данные каталоги  "/hdd1, /ssd1, /hdd2, /ssd2, /hdd3, /ssd3" , но после сохранения и повторного запуска удаляются все значения и появляется "min-size=100000 " в
группе каталог 1 уровня , подскажите как решить данную проблему.
Ssl_dump на прозрачном squid без сертификатов в браузере, !*! hudsucker, (Прозрачный proxy) 08-Фев-17, 17:24  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Добрый день!
Пытаюсь настроить Squid для корпоративной сети. Нужно работать в двух режимах непрозрачный с авторизацией по группам в АД, и прозрачный для разного рода устройств, которые либо не поддерживают WPAD, либо нет возможности указывать прокси в браузере вручную (гостевые android телефоны, ноутбуки, ПК и т.д).
С первым вариантом все в порядке.
Со вторым - затык. HTTP работает, HTTPS как бы тоже, но браузер ругается на поддельный сертификат. Устанавливать сертификаты на каждое новое устройство желания нет.
Поэтому вопрос:
Есть ли возможность настроить Сквид в прозрачном(!) режиме для работы с https без установки сквидовского сертификата на клиенты? В гугле искал, оф. документацию читал, ответа пока не нашел. Достаточно чтобы Сквид просто смотрел SNI в Client Hello, и пропускал (то есть splice) или делал terminate, в зависимости от SNI, ну и писал логи по этим сайтам. То есть можно обойтись без дешифровки (bump)
Спасибо
Настройка авторизации по имени и паролю, !*! kolyzey, (Аутентификация) 01-Фев-17, 10:32  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Здравствуйте !
принимайте новичка :)
Озадачился созданием прокси SQUID, на Ubuntu
Создал сервер, установил squid/3.5.12
Поднял NAT.
СОДЕРЖАНИЕ squid.config :
acl url_filtred src 192.168.0.1-192.168.1.250

acl localnet src 192.168.0.0/24 192.168.1.0/24


access_log daemon:/var/log/squid/access.log squid
logfile_rotate 31

acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl CONNECT method CONNECT

http_access deny CONNECT !SSL_ports

http_access allow localhost manager
http_access deny manager

#http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy

auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/internet_users
auth_param basic children 5
auth_param basic realm =My PROXY serveR=
auth_param basic credentialsttl 2 hours
acl internet_users proxy_auth REQUIRED
http_access allow internet_users

http_access deny all

http_port 192.168.1.252:3128 intercept

maximum_object_size 4 MB

cache_dir ufs /var/spool/squid 2048 16 256

СОДЕРЖАНИЕ nat:

#!/bin/sh

#Включаем форвардинг пакетов
echo 1 > /proc/sys/net/ipv4/ip_forward

#Разрешаем траффик на lo
iptables -A INPUT -i lo -j ACCEPT

# Запрещаем HTTP через NAT
#iptables -A FORWARD -i eth1 -p tcp --dport 80 -j REJECT


#Разрешаем доступ из внутренней сети наружу
iptables -A FORWARD -i ens160 -o ens192 -j ACCEPT

#Включаем NAT
iptables -t nat -A POSTROUTING -o ens192 -s 192.168.0.0/23 -j MASQUERADE

#Разрешаем ответы из внешней сети
iptables -A FORWARD -i ens192 -m state --state ESTABLISHED,RELATED -j ACCEPT

#Запрещаем доступ снаружи во внутреннюю сеть
iptables -A FORWARD -i ens192 -o ens160 -j REJECT

# Заворачиваем http на прокси
iptables -t nat -A PREROUTING -i ens160 ! -d 192.168.0.0/23 -p tcp -m multiport --dport 80,8080 -j DNAT --to 192.168.1.252:3128

# Заворачиваем http на прокси
iptables -t nat -A PREROUTING -i ens160 ! -d 192.168.1.0/23 -p tcp -m multiport --dport 80,8080 -j DNAT --to 192.168.1.252:3128

Если в конфиге квида вместо строки
http_port 192.168.1.252:3128 intercept

оставить  http_port 3128
и убрать :
# And finally deny all other access to this proxy

auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/internet_users
auth_param basic children 5
auth_param basic realm =My PROXY serveR=
auth_param basic credentialsttl 2 hours
acl internet_users proxy_auth REQUIRED
http_access allow internet_users

то пускает всех из локалки (с указанием прокси в браузере)

Ткните носом - что не так.

Заранее спасибо !!!

squid, tansparent, ssl peek, !*! ShyLion, (Прозрачный proxy) 27-Янв-17, 08:02  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Приветствую. Пытаюсь настроить элементарный прозрачный конфиг, без подделки сертификатов, но получается так, что либо нормально фильтруется https и полностью пропускается http, либо нормально фильтруется http и полностью не пропускается https.

Конфиг элементарный:


http_port 10.96.243.1:3128 intercept options=NO_SSLv3:NO_SSLv2
http_port 10.96.243.1:3130 options=NO_SSLv3:NO_SSLv2
https_port 10.96.243.1:3129 intercept ssl-bump options=ALL:NO_SSLv3:NO_SSLv2 connection-auth=off cert=/etc/squid/squidCA.pem

acl localnet src 10.0.0.0/8     # RFC1918 possible internal network

acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 443         # https
acl CONNECT method CONNECT

acl http_allow dstdomain "/etc/squid/http_allow_domains.txt"
acl https_allow ssl::server_name  "/etc/squid/https_allow_domains.txt"

sslproxy_cert_error allow all
sslproxy_flags DONT_VERIFY_PEER

acl step1 at_step SslBump1
ssl_bump peek step1
ssl_bump splice https_allow
ssl_bump terminate all

cache deny all

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager

http_access allow all http_allow
http_access allow all https_allow
http_access deny all

always_direct allow all

coredump_dir /var/spool/squid

refresh_pattern .               0       0%      0

logformat ssl %ts.%03tu %6tr %>a %la:%lp %Ss/%03>Hs %<st %rm %ssl::>sni %ru %[un %Sh/%<a %mt
access_log daemon:/var/log/squid/access.log logformat=ssl


# cat http_allow_domains.txt
.google.com
# cat https_allow_domains.txt
.google.com

В таком виде фильтруется http, а https не работает - выдает самоподписаную страницу с отказом доступа.

если правила доступа поменять на:


http_access allow all

То начинает нормально фильтроваться https, а http пропускается весь, что логично.

Что я делаю не так????

Срочно нужна помощь Squd не работает!, !*! bearwoolf, (Squid) 26-Янв-17, 15:02  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Добрый день! Два года к ряду работал себе Squid и сегодня без ведомых причин все встало колом и не пашет. Авторизация проходит!
С Самого сервера инет есть ping по имени и ИП, nslookup работает!
Telnet на сервер подключается
Минуя SQUID инет пашет.
Прошу Помощи!
Логи:
2017/01/25 13:15:08 kid1| Set Current Directory to /var/spool/squid3
2017/01/25 13:15:08 kid1| Starting Squid Cache version 3.4.8 for i586-pc-linux-gnu...
2017/01/25 13:15:08 kid1| Process ID 1141
2017/01/25 13:15:08 kid1| Process Roles: worker
2017/01/25 13:15:08 kid1| With 65535 file descriptors available
2017/01/25 13:15:08 kid1| Initializing IP Cache...
2017/01/25 13:15:08 kid1| DNS Socket created at [::], FD 7
2017/01/25 13:15:08 kid1| DNS Socket created at 0.0.0.0, FD 8
2017/01/25 13:15:08 kid1| Adding domain domain.local from /etc/resolv.conf
2017/01/25 13:15:08 kid1| Adding nameserver 192.168.21.215 from /etc/resolv.conf
2017/01/25 13:15:08 kid1| helperOpenServers: Starting 0/50 'basic_ldap_auth' processes
2017/01/25 13:15:08 kid1| helperOpenServers: No 'basic_ldap_auth' processes needed.
2017/01/25 13:15:08 kid1| helperOpenServers: Starting 5/5 'ext_ldap_group_acl' processes
2017/01/25 13:15:08 kid1| Logfile: opening log /var/log/squid3/access.log
2017/01/25 13:15:08 kid1| WARNING: log name now starts with a module name. Use 'stdio:/var/log/squid3/access.log'
2017/01/25 13:15:08 kid1| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2017/01/25 13:15:08 kid1| Store logging disabled
2017/01/25 13:15:08 kid1| Swap maxSize 0 + 262144 KB, estimated 20164 objects
2017/01/25 13:15:08 kid1| Target number of buckets: 1008
2017/01/25 13:15:08 kid1| Using 8192 Store buckets
2017/01/25 13:15:08 kid1| Max Mem  size: 262144 KB
2017/01/25 13:15:08 kid1| Max Swap size: 0 KB
2017/01/25 13:15:08 kid1| Using Least Load store dir selection
2017/01/25 13:15:08 kid1| Set Current Directory to /var/spool/squid3
2017/01/25 13:15:08 kid1| Finished loading MIME types and icons.
2017/01/25 13:15:08 kid1| HTCP Disabled.
2017/01/25 13:15:08 kid1| Pinger socket opened on FD 22
2017/01/25 13:15:08 kid1| Squid plugin modules loaded: 0
2017/01/25 13:15:08 kid1| Adaptation support is off.
2017/01/25 13:15:08 kid1| Accepting HTTP Socket connections at local=192.168.21.217:3128 remote=[::] FD 20 flags=9
2017/01/25 13:15:08| pinger: Initialising ICMP pinger ...
2017/01/25 13:15:08| pinger: ICMP socket opened.
2017/01/25 13:15:08| pinger: ICMPv6 socket opened
2017/01/25 13:15:09 kid1| storeLateRelease: released 0 objects
2017/01/25 13:15:27 kid1| Starting new basicauthenticator helpers...
2017/01/25 13:15:27 kid1| helperOpenServers: Starting 1/50 'basic_ldap_auth' processes
Конфиг:
auth_param basic program /usr/lib/squid3/basic_ldap_auth -R -D ProxyUser1@domain.local -w "password" -b "DC=domain,DC=local" -f "sAMAccountName=%s" -h 192.168.21.215
#и параметры для его запуска
auth_param basic children 50
auth_param basic realm Welcome! Please, enter your password.
auth_param basic credentialsttl 12 hours
auth_param basic casesensitive off
#описываем локальную сеть (про acl'ки типа localhost и all squid3 знает сам)
acl localnet src 192.168.21.0/24
#разрешенные порты, методы и области подключения
acl Safe_ports port 20-21
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 8080
acl Safe_ports port 443
#http_access deny !Safe_ports
acl CONNECT method CONNECT
external_acl_type ldap_users %LOGIN /usr/lib/squid3/ext_ldap_group_acl -v 3 -P -R -K -b "dc=domain,dc=local" -D "cn=ProxyUser,cn=Users,dc=domen,dc=local" -w "password"
-f "(&(objectclass=person)(sAMAccountName=%v)(memberOf:1.2.840.113556.1.4.1941:=cn=%g,CN=Users,dc=domen,dc=local))" -h 192.168.21.215
#Запрещенные сайты
acl black_list dstdomain "/etc/squid3/black_list"

#Группы
acl Internet external ldap_users Internet
acl Internetmin external ldap_users Internetmin
http_access allow all Internet
#Запретить группе сайты из листа
#http_access allow all Internetmin
http_access deny Internetmin black_list
http_access allow all Internetmin
#в конце запретим всем остальным пользование этим прокси-сервером
http_access deny all
#далее идут мои настройки
http_port 192.168.21.217:3128
#SYSTEM
# Куда и в каком объеме будем писать логи
access_log /var/log/squid3/access.log
logfile_rotate 100
coredump_dir /var/spool/squid3
# Запрещаем отображение версии прокси-сервера и имени
httpd_suppress_version_string on
visible_hostname PROXYSERVER
# Включаем русский язык для сообщений сервера
error_directory /usr/share/squid3/errors/Russian-1251
error_default_language ru# Включаем русский язык для сообщений сервера
error_directory /usr/share/squid3/errors/Russian-1251


Iptables:
iptables -n -L -v --line-numbers
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destina                                                  tion

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destina                                                  tion

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destina

При чем
Сайт ulmart.ru и opennet.ru открываются.
Напомню что все сайты которые не открываются тип mail.ru или vk.com открываются на прямую из этой же сети.

Squid и кэширование Yandex Maps, !*! Atriarh, (Squid) 25-Янв-17, 17:18  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Нужно создать локальный кеш Yandex Maps, нашол конфиг немного поправил
оригинал в блоге http://yvoinov.blogspot.com/2015/09/squid-3-yandex-maps.html
версия squid 3.5,  FreeBSD 11

acl store_rewrite_list_web url_regex "/usr/local/etc/squid/url.rewrite_web"  
acl GET method GET
  
cat /usr/local/etc/squid/url.rewrite_web:  
  
  # Yandex maps  
  vec[\d][\d]\.maps\.yandex\.net  
  lrs\.maps\.yandex\.net  
  stv\.maps\.yandex\.net  
    
cat /usr/local/etc/squid/squid.conf:  
  
  # Storeurl rewriter  
  store_id_program /usr/local/squid/libexec/storeid_file_rewrite            /usr/local/etc/squid/storeid.conf  
  store_id_children 32 startup=0 idle=1 concurrency=0  
  # Store ID access  
  store_id_access deny !GET  
  store_id_access allow store_rewrite_list  
  store_id_access allow store_rewrite_list_web  
  store_id_access allow store_rewrite_list_web_cdn  
  store_id_access deny all  
  store_id_bypass off  
    
cat /usr/local/etc/squid/storeid.conf:  
    
  vec[\d][\d]\.maps\.yandex\.net\/tiles\?.*x=([^&]+).*&y=([^&]+).*&z=([^&]+).*&lang=([^&]+)   http://ymaps-vec.squidinternal/$1/$2/$3/$4  
  lrs\.maps\.yandex\.net\/tiles\?.*x=([^&]+).*&y=([^&]+).*&z=([^&]+).*&lang=([^&]+)  http://ymaps-lrs.squidinternal/$1/$2/$3/$4  
  stv\.maps\.yandex\.net\/images\/.*oid=([^&]+).*x=([^&]+).*&y=([^&]+).*&z=([^&]+)   http://ymaps-stv.squidinternal/$1/$2/$3/$4  

Запуск squid

Starting squid.
2017/01/25 16:21:11| ACL not found: store_rewrite_list
FATAL: Bungled /usr/local/etc/squid/squid.conf line 86: store_id_access allow store_rewrite_list
Squid Cache (Version 3.5.23): Terminated abnormally.
CPU Usage: 0.005 seconds = 0.000 user + 0.005 sys
Maximum Resident Size: 23040 KB
Page faults with physical i/o: 0
/usr/local/etc/rc.d/squid: WARNING: failed to start squid


Подскажите пожалуйста куда смотреть, и что почитать?
store_rewrite_list
store_rewrite_list_web
store_rewrite_list_web_cdn  нужно создать вручную ?
И зачем нужен !GET ?

delay_pool + mime_type, !*! stakado, (ACL, блокировки) 12-Янв-17, 10:46  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Здравствуйте!
Есть ли возможность отнести траффик по его содержимому (mime_type) в определенный delay_pool? Сделать это хочется, для того чтобы урезать скорость при просмотре/скачивании видео/аудио файлов.

Попробовал указать так, но не работает:
acl mime-test rep_mime_type -i audio/*
delay_pools 1
delay_class 1 1
delay_access 1 allow mime-test
delay_access 1 deny all
delay_parameters 1 500000/500000

Да и в cache.log сыпятся ошибки, говорящие о том, что описаное выше не верно:
WARNING: mime-test ACL is used in context without an HTTP response. Assuming mismatch.

На текущий момент приходится перебирать все возможные адреса youtube, vk.com (audio&video) и прочих и по ним направлять траффик в delay_pool.
Но ведь всегда найдётся какой-нибудь сайтик с аудио/видео, адрес которого я не занёс в конфиг, и при просмотре видео с этого сайта скорость резаться не будет.
Поэтому и хочется ограничивать скорость исходя из содержимого траффика.

PS: просьба не разводить полемику о том, что некоторые нехорошие сайты неверно указывают content-type (например вместо video/x-flv шлют text).

Не добавляются acl в saquid, !*! sasha198407, (ACL, блокировки) 08-Дек-16, 11:10  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Доброго времени суток. Поставил Centos7+squid3.3.8+apache2.4.6+php5.4.16, скачал с официального сайта и установил из исходников sams2-2.0.2. Настроил sams и squid на работу с ntlm, но интернет не раздается. Вот конфиг squid

auth_param ntlm program /usr/bin/ntlm_auth --diagnostics --helper-protocol=squid-2.5-ntlmssp --domain=DOMAIN
auth_param ntlm children 10
auth_param ntlm keep_alive off

# TAG: acl
acl Sams2Time1 time MTWHFAS 00:00-23:59
acl Sams2Template1 src

# TAG: url_rewrite_access
acl Sams2Proxy dst 192.168.1.3
url_rewrite_access deny Sams2Proxy

# TAG: url_rewrite_program
url_rewrite_program /usr/local/bin/sams2redir

# TAG: url_rewrite_children
url_rewrite_children 5

# TAG: delay_pools

# TAG: delay_class

# TAG: delay_access

# TAG: delay_parameters

# TAG: http_access
# Setup Sams2 HTTP Access here
http_access allow Sams2Template1

# TAG: http_access2

# TAG: icp_access

visible_hostname proxy1

acl localnet src 10.0.0.0/8     # RFC1918 possible internal network
acl localnet src 172.16.0.0/12  # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl CONNECT method CONNECT

http_access deny !Safe_ports

http_access deny CONNECT !SSL_ports

http_access allow localhost manager
http_access deny manager

http_access allow localhost

http_access deny all

http_port 3128

coredump_dir /var/spool/squid

refresh_pattern ^ftp:         &n... 1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern .               0       20%     4320


Проверяю статус squid
# systemctl status squid

показывает
 Warning: empty ACL: acl Sams2Template1 src

Как видно из конфига, показанного выше, src и правда не определен.
Находил в нете статью, где человек настраивает данную связку, только sams предлагает скачать свой. Я же хочу с оф. сайта, а он не идет. Что делать?
squid Delay Pools не режет скорость, !*! ramzes3000, (Ограничение трафика) 07-Дек-16, 20:24  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Здравствуйте.
ОС Centos 7
squid 3.3
сеть 192.168.0.0/24

не режет скорость

acl SSL_ports port 443 # RFC1918 possible internal network
acl Safe_ports port 80 # RFC1918 possible internal network
acl Safe_ports port 21 # RFC1918 possible internal network
acl Safe_ports port 443 # RFC 4193 local private network range
acl Safe_ports port 70 # RFC 4291 link-local (directly plugged) machines

acl Safe_ports port 210
acl Safe_ports port 1025-65535 # http
acl Safe_ports port 280 # ftp
acl Safe_ports port 488 # https
acl Safe_ports port 591 # gopher
acl Safe_ports port 777 # wais
acl CONNECT method CONNECT # unregistered ports
acl test src 192.168.0.252

http_access deny !Safe_ports

http_access deny CONNECT !SSL_ports

http_access allow localhost manager
http_access deny manager

http_access allow localhost

http_access allow test
http_access deny all

http_port 3128 transparent

cache_dir ufs /var/spool/squid 1000 16 256

coredump_dir /var/spool/squid

cache_mem 2000 MB
delay_pools 1
delay_class 1 2
delay_parameters 1 125000/125000 125000/125000
delay_access 1 allow test
delay_access 1 deny all

squid + ntlm аутентификация, !*! slava007, (Аутентификация) 17-Ноя-16, 11:38  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Добрый день.
Имеется squid 3.5.22

Squid Cache: Version 3.5.22
Service Name: squid
configure options:  '--build=x86_64-linux-gnu' '--program-prefix=' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--exec_prefix=/usr' '--libexecdir=/usr/lib/squid' '--localstatedir=/var' '--datadir=/usr/share/squid' '--sysconfdir=/etc/squid' '--with-logdir=/var/log/squid' '--with-pidfile=/var/run/squid.pid' '--disable-dependency-tracking' '--enable-arp-acl' '--enable-follow-x-forwarded-for' '--enable-auth' '--enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SMB,YP,getpwnam,multi-domain-NTLM,SASL,DB,POP3,squid_radius_auth' '--enable-ntlm-auth-helpers=smb_lm,no_check,fakeauth' '--enable-digest-auth-helpers=password,ldap,eDirectory' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-external-acl-helpers=file_userip,LDAP_group,session,unix_group,wbinfo_group,SQL_session' '--enable-cache-digests' '--enable-cachemgr-hostname=localhost' '--enable-delay-pools' '--enable-epoll' '--enable-icap-client' '--enable-ident-lookups' '--with-large-files' '--enable-linux-netfilter' '--enable-referer-log' '--enable-removal-policies=heap,lru' '--enable-snmp' '--enable-ssl' '--enable-storeio=aufs,diskd,ufs' '--enable-useragent-log' '--enable-wccpv2' '--enable-esi' '--with-aio' '--with-default-user=squid' '--with-filedescriptors=16384' '--with-dl' '--with-pthreads' '--prefix=/usr' 'build_alias=x86_64-linux-gnu'

так же имеется проблема ntlm аутентификации на sharepoint сервере. В журнале access прокси имеются такие записи:

1478880114.577 3 192.168.103.156 TCP_MISS/401 866 POST http://sharepointsrv/sites/portal/Company/PhoneBase.aspx - HIER_DIRECT/192.168.11.40 -

Напрямую, без прокси, аутентификация с рабочей станции происходит корректно.

Почитав немного документацию, пришел к выводу, что в случае с проксированием ntlm аутентификации  hierarchy status должен быть PINNED вместо HIER_DIRECT. Поправил в конфиге директиву http_port, добавив параметр connection-auth=on (хоть, как пишут, по умолчанию о должен быть включен)

http_port 3128  tcpkeepalive=30,10,60 connection-auth=on

однако должного эффекта это не возымело.

Так же имеется другой прокси версии 3.1.8 и следующей конфигурации:

Squid Cache: Version 3.1.8
configure options:  '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--exec_prefix=/usr' '--libexecdir=/usr/lib/squid' '--localstatedir=/var' '--datadir=/usr/share/squid' '--sysconfdir=/etc/squid' '--with-logdir=$(localstatedir)/log/squid' '--with-pidfile=$(localstatedir)/run/squid.pid' '--disable-dependency-tracking' '--enable-arp-acl' '--enable-follow-x-forwarded-for' '--enable-auth=basic,digest,ntlm,negotiate' '--enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SMB,YP,getpwnam,multi-domain-NTLM,SASL,DB,POP3,squid_radius_auth' '--enable-ntlm-auth-helpers=smb_lm,no_check,fakeauth' '--enable-digest-auth-helpers=password,ldap,eDirectory' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-external-acl-helpers=ip_user,ldap_group,session,unix_group,wbinfo_group' '--enable-cache-digests' '--enable-cachemgr-hostname=localhost' '--enable-delay-pools' '--enable-epoll' '--enable-icap-client' '--enable-ident-lookups' '--with-large-files' '--enable-linux-netfilter' '--enable-referer-log' '--enable-removal-policies=heap,lru' '--enable-snmp' '--enable-ssl' '--enable-storeio=aufs,diskd,ufs' '--enable-useragent-log' '--enable-wccpv2' '--enable-esi' '--with-aio' '--with-default-user=squid' '--with-filedescriptors=16384' '--with-dl' '--with-openssl' '--with-pthreads' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i386-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --with-squid=/builddir/build/BUILD/squid-3.1.8 --enable-ltdl-convenience

данный сервер проксирование ntlm осуществляет корректно:

1479369471.703    490 192.168.103.156 TCP_MISS/200 38724 POST http://sharepointsrv/sites/portal/Company/PhoneBase.aspx - PINNED/192.168.11.40 text/html

Различие между конфигурациями серверов  3.1 и 3.5 это то, что на 3.1 установлена samba+winbind однако, насколько я понял, samba+winbind необходимы для ntlm аутентификации на самом прокси сервере, а не на sharepoint сервере.
Подскажите, пожалуйста, в чем может быть проблема.

Блокировка tor browser, !*! boJIbTpoH, (Другие proxy) 10-Ноя-16, 14:18  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Добрый день, подскажите пожалуйста как обойти блокировку Tor. На предприятии заблочичли доступ к разным ресурсам типа youtube, люди активно стали использовать Tor в обход блокировки, после чего заблочили и Tor. Он просто не запускается. Подскажите как обойти блокировку Torа.
Перекинуть часть пользователей c основного на другой squid, !*! niorix, (Squid) 07-Ноя-16, 05:23  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Добрый день.
В конторе есть сервачек со squid. Подняли новый тестовый сервер со squid. Оба настроены в режиме прозрачного прокси. Основной рабочий squid прописан у пользователей в качестве шлюза.
Надо перекинуть определенных пользователей (по ip) с основного сервера на тестовый. Не могу додуматься как...
Пробовал iptables -t nat -I PREROUTING -s x.x.x.x --dport 443 -j DNAT --to-destination x.x.x.x:3129 не катит. Как сделать правильно?


SQUID, проксирование http траффика (копия сайта), !*! IVAN22, (Прозрачный proxy) 30-Окт-16, 12:33  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Совсем новичек в squid,подскажите в какую сторону копать,задача такая - сделать проксируемую копию сайта (http)
Не стартует squid, !*! sasha198407, (Squid) 14-Окт-16, 16:04  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Доброго времени суток. Поставил на CentOS 7 x64 squid. Ставил через yum. Если делаем
systemctl start squid

, то все работает отлично. А если сделать
systemctl enable squid

, то после перезагрузки
systemctl status squid

показывает
● squid.service - Squid caching proxy
Loaded: loaded (/usr/lib/systemd/system/squid.service; enabled; vendor preset: disabled)
Active: active (running) (Result: exit-code) since Fri 2016-10-14 15:00:38 MSK; 28min ago
Process: 1169 ExecReload=/usr/sbin/squid $SQUID_OPTS -k reconfigure -f $SQUID_CONF (code=exited, status=1/FAILURE)
Process: 931 ExecStart=/usr/sbin/squid $SQUID_OPTS -f $SQUID_CONF (code=exited, status=0/SUCCESS)
Process: 915 ExecStartPre=/usr/libexec/squid/cache_swap.sh (code=exited, status=0/SUCCESS)
Main PID: 1100 (squid)
CGroup: /system.slice/squid.service
├─1100 /usr/sbin/squid -f /etc/squid/squid.conf
├─1103 (squid-1) -f /etc/squid/squid.conf
└─1180 (logfile-daemon) /var/log/squid/access.log

Oct 14 15:00:37 fw systemd[1]: Starting Squid caching proxy...
Oct 14 15:00:38 fw squid[1100]: Squid Parent: will start 1 kids
Oct 14 15:00:38 fw squid[1100]: Squid Parent: (squid-1) process 1103 started
Oct 14 15:00:38 fw systemd[1]: Started Squid caching proxy.
Oct 14 15:00:38 fw squid[1169]: squid: ERROR: No running copy
Oct 14 15:00:38 fw systemd[1]: squid.service: control process exited, code=exited status=1
Oct 14 15:00:38 fw systemd[1]: Reload failed for Squid caching proxy.


и squid не работает. В файле конфигурации squid прописал
visible_hostname fw
pid_filename /run/squid.pid

результат тот же.
Попробовал
chown squid:squid /run/squid.pid

Не помогло, причем после перезагрузки хозяином снова становится root, а не squid. Порыл и выяснил, что squid.pid находится и в /run/ и в /var/run/ . Пробовал играть и с /run/squid.pid и с /var/run/squid.pid
Вот файл squid

visible_hostname fw
pid_filename /run/squid.pid
#
# Recommended minimum configuration:
#

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT

#
# Recommended minimum Access Permission configuration:
#
# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost

#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all

# Squid normally listens to port 3128
http_port 3128

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid

#
# Add any of your own refresh_pattern entries above these.
#
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320


В общем господа спецы хелп ми.
squid + хелпер ext_kerberos_ldap_group_acl, !*! sbrain, (Аутентификация) 13-Окт-16, 15:05  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Товарищи гуру! Подскажите как мне собрать этот хелпер для centOS 7....да не умею пользоваться гуглом..ничего не нашел (в частности исходники его) ...Буду признателен за ссылки по данной теме
Squid + PF, !*! kamerad, (Squid) 07-Окт-16, 14:40  [ | | | ] [линейный вид] [смотреть все] [раскрыть новое]
Есть стенд. Установил включил Squid. Он работает.
Как только настраиваю и включаю PF, squid перестает работать и более не стартует.


Настройки сквида дефолтные поправил только:
# Squid normally listens to port 3128
http_port 3128
http_port 127.0.0.1:3128 intercept

pf.conf

ext_if = "hn0" # macro for external interface
int_if = "hn1" # macro for internal interface

nat on $ext_if from $int_if:network to any -> ($ext_if)
#nat on $ext_if from !($ext_if)->($ext_if:0)
rdr on $int_if inet proto tcp from any to any port www -> 127.0.0.1 port 3128

tcp_services = "{ ssh, smtp, domain, http, https, 821, 1723, nfsd, rpcbind }"
ftp_ports = "{ ftp, ftp-data }"
udp_services = "{ domain, ntp, rpcbind, 821, 1723, nfsd }"
block in all
pass quick inet proto gre to any keep state
pass quick inet proto { tcp, udp } from any to any port $ftp_ports keep state
pass quick inet proto { tcp, udp } from any to any port > 18000 keep state
pass quick inet proto udp to any port $udp_services keep state
pass quick inet proto tcp to any port $tcp_services keep state
pass quick inet proto icmp from any to any
pass out on $ext_if inet proto udp from any to any port 33433 >< 33626 keep state
pass quick inet proto { tcp, udp } from any to port { nfsd, rpcbind } keep state
# mountd -p 883
pass quick inet proto { tcp, udp } from any to port 883 keep state
# rpc.lockd -p 884
pass quick inet proto { tcp, udp } from any to port 884 keep state
# rpc.statd -p 885
pass quick inet proto { tcp, udp } from any to port 885 keep state
block in log all

rc.conf

hostname="BSD"
sshd_enable="YES"
ntpd_enable="YES"
ifconfig_hn0="inet 172.17.9.25 255.255.254.0"
ifconfig_hn1="inet 192.168.0.1 255.255.255.0"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
defaultrouter="172.17.8.1"
inetd_enable="YES"
ftpd_enable="YES"
named_enable="YES"
sendmail_enable="YES"
dhcpd_enable="YES"
dhcpd_ifaces="hn1"
squid_enable="YES"
pf_enable="YES"                 # Enable PF (load module if required)
pf_rules="/etc/pf.conf"         # rules definition file for pf
pf_flags=""                     # additional flags for pfctl startup
pflog_enable="YES"              # start pflogd(8)
pflog_logfile="/var/log/pflog"  # where pflogd should store the logfile
pflog_flags=""                  # additional flags for pflogd startup
gateway_enable="YES"

/etc/sysctl.conf

sysctl -w net.inet.ip.forwarding=1

логи сквида:

2016/10/07 14:28:33 kid1| Set Current Directory to /var/squid/cache
2016/10/07 14:28:33 kid1| Starting Squid Cache version 3.5.20 for i386-portbld-freebsd10.1...
2016/10/07 14:28:33 kid1| Service Name: squid
2016/10/07 14:28:33 kid1| Process ID 1041
2016/10/07 14:28:33 kid1| Process Roles: worker
2016/10/07 14:28:33 kid1| With 113562 file descriptors available
2016/10/07 14:28:33 kid1| Initializing IP Cache...
2016/10/07 14:28:33 kid1| DNS Socket created at [::], FD 6
2016/10/07 14:28:33 kid1| DNS Socket created at 0.0.0.0, FD 8
2016/10/07 14:28:33 kid1| Adding nameserver 127.0.0.1 from /etc/resolv.conf
2016/10/07 14:28:33 kid1| Adding domain test.dom from /etc/resolv.conf
2016/10/07 14:28:33 kid1| Logfile: opening log daemon:/var/log/squid/access.log
2016/10/07 14:28:33 kid1| Logfile Daemon: opening log /var/log/squid/access.log
2016/10/07 14:28:33 kid1| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2016/10/07 14:28:33 kid1| Store logging disabled
2016/10/07 14:28:33 kid1| Swap maxSize 0 + 262144 KB, estimated 20164 objects
2016/10/07 14:28:33 kid1| Target number of buckets: 1008
2016/10/07 14:28:33 kid1| Using 8192 Store buckets
2016/10/07 14:28:33 kid1| Max Mem  size: 262144 KB
2016/10/07 14:28:33 kid1| Max Swap size: 0 KB
2016/10/07 14:28:33 kid1| Using Least Load store dir selection
2016/10/07 14:28:33 kid1| Set Current Directory to /var/squid/cache
2016/10/07 14:28:33 kid1| Finished loading MIME types and icons.
2016/10/07 14:28:33 kid1| HTCP Disabled.
2016/10/07 14:28:33| pinger: Initialising ICMP pinger ...
2016/10/07 14:28:33| pinger: ICMP socket opened.
2016/10/07 14:28:33| pinger: ICMPv6 socket opened

 
Пометить прочитанным Создать тему
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Архив | Избранное | Мое | Новое | | |



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру