Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  | Правила  

Компьютерный форум OSzone.net » Linux и FreeBSD » Общий по FreeBSD » FreeBSD - Не работает прозрачны прокси SQUID

Ответить
Настройки темы
FreeBSD - Не работает прозрачны прокси SQUID

Пользователь


Сообщения: 54
Благодарности: 0

Профиль | Отправить PM | Цитировать


Добрый день. Есть проблема, с которой я разобраться не могу.
Дано:
Сервер на FreeBSD 10
пакетный фильтр PF
squid 3.5
Проблема: При настройки прозрачного проксирования выдается ошибка на хосте (в браузере)
В чем проблема? Помогите разобраться, пожалуйста!
Ошибка в браузере
ERROR
The requested URL could not be retrieved

The following error was encountered while trying to retrieve the URL: /

Invalid URL

Some aspect of the requested URL is incorrect.

Some possible problems are:

Missing or incorrect access protocol (should be "http://" or similar)

Missing hostname

Illegal double-escape in the URL-Path

Illegal character in hostname; underscores are not allowed.

Your cache administrator is webmaster.

Если устанавливать в браузере настройки сквида, то все нормально - работает.
Конфигурация squid
#
# 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
http_port 3128
http_port 127.0.0.1:3128 intercept

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

# Leave coredumps in the first cache dir
coredump_dir /var/squid/cache
visible_hostname BSDGW
#
# 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


На стороне PF настроено правило rdr
rdr on $iface2 proto tcp from {192.168.13.75} to any port $www_ports -> 192.168.0.1 port 3128


SQUID собран с параметрами
squid-3.5.9
Name : squid
Version : 3.5.9
Installed on : Fri Jul 15 09:05:37 2016 IRKT
Origin : www/squid
Architecture : freebsd:10:x86:32
Prefix : /usr/local
Categories : ipv6 www
Licenses : GPLv2
Maintainer : timp87@gmail.com
WWW : http://www.squid-cache.org/
Comment : HTTP Caching Proxy
Options :
ARP_ACL : off
AUTH_LDAP : off
AUTH_NIS : on
AUTH_SASL : off
AUTH_SMB : off
AUTH_SQL : off
CACHE_DIGESTS : off
DEBUG : off
DELAY_POOLS : on
DOCS : on
ECAP : off
ESI : off
EXAMPLES : on
FOLLOW_XFF : off
FS_AUFS : on
FS_DISKD : on
FS_ROCK : off
GSSAPI_BASE : on
GSSAPI_HEIMDAL : off
GSSAPI_MIT : off
GSSAPI_NONE : off
HTCP : on
ICAP : off
ICMP : off
IDENT : on
IPV6 : on
KQUEUE : on
LARGEFILE : on
LAX_HTTP : on
NETTLE : off
SNMP : on
SSL : off
SSL_CRTD : off
STACKTRACES : off
TP_IPF : off
TP_IPFW : off
TP_PF : on
VIA_DB : off
WCCP : on
WCCPV2 : on
Annotations :
cpe : cpe:2.3:a:squid-cache:squid:3.5.9:::::freebsd10:x86
Flat size : 8.05MiB
Description :
Squid is a fully-featured HTTP/1.0 proxy which is almost (but not quite)
HTTP/1.1 compliant. Squid offers a rich access control, authorization and
logging environment to develop web proxy and content serving applications.

WWW: http://www.squid-cache.org/

Отправлено: 06:11, 19-07-2016

 
zai zai вне форума

Аватара для zai

Ветеран


Сообщения: 4964
Благодарности: 724

Профиль | Отправить PM | Цитировать


Попробуй transparent вместо intercept и указать реальный ip

-------
А зачем тебе жужжать, если ты не пчела? По-моему так.


Отправлено: 16:58, 19-07-2016 | #2



Для отключения данного рекламного блока вам необходимо зарегистрироваться или войти с учетной записью социальной сети.

Если же вы забыли свой пароль на форуме, то воспользуйтесь данной ссылкой для восстановления пароля.


Пользователь


Сообщения: 54
Благодарности: 0

Профиль | Отправить PM | Цитировать


В версии SQUID выше 3.2 используется intercept, но замену transparent выполнял. Но ничего не помогло. Замену ip адреса http_port 192.168.20.1:3128 intercept выполнял. Так менял параметры на pf.
Что делать?

Отправлено: 05:23, 20-07-2016 | #3

zai zai вне форума

Аватара для zai

Ветеран


Сообщения: 4964
Благодарности: 724

Профиль | Отправить PM | Цитировать


Порт 80 перенаправлен на 3128?

-------
А зачем тебе жужжать, если ты не пчела? По-моему так.


Отправлено: 09:11, 20-07-2016 | #4


Аватара для NickM

Ветеран


Contributor


Сообщения: 4224
Благодарности: 986

Профиль | Отправить PM | Цитировать


tangichhan, для чего требуется прозрачность? Как с https поступите?

Отправлено: 20:40, 20-07-2016 | #5


Пользователь


Сообщения: 54
Благодарности: 0

Профиль | Отправить PM | Цитировать


для https будет NAT, для остального трафика прокси

Отправлено: 15:49, 24-07-2016 | #6


Аватара для smastykov

Новый участник


Сообщения: 1
Благодарности: 0

Профиль | Сайт | Отправить PM | Цитировать


Кусок из squid.conf
===
# Адрес и порт для входящих подключений
# При прозрачном проксировании может использоваться для управления кэшем
http_port 3128
# Локальный интерфейс, для трафика, перенаправленного брандмауэром
http_port 3129 intercept
===

Отправлено: 10:20, 03-07-2017 | #7



Компьютерный форум OSzone.net » Linux и FreeBSD » Общий по FreeBSD » FreeBSD - Не работает прозрачны прокси SQUID

Участник сейчас на форуме Участник сейчас на форуме Участник вне форума Участник вне форума Автор темы Автор темы Шапка темы Сообщение прикреплено

Похожие темы
Название темы Автор Информация о форуме Ответов Последнее сообщение
Debian/Ubuntu - squid+iptables = обход прокси alex.nel.9461@fb Общий по Linux 4 21-03-2014 21:09
Redhat/Fedora - ошибка в прозрачном прокси squid kozyr76 Общий по Linux 3 06-12-2012 13:04
Прочее - прокси через squid ~user~ Сетевые технологии 12 15-01-2012 19:01
FreeBSD - Не работает SQUID Ruslan19891989 Общий по FreeBSD 5 19-12-2011 16:58
не работает SQUID 2.5 Romik2 Общий по Linux 10 06-05-2006 11:04




 
Переход