ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] squid transparenr proxy
@ 2005-03-26 18:02 Igor Shevchenko
  2005-03-28  8:20 ` Olvin
  0 siblings, 1 reply; 5+ messages in thread
From: Igor Shevchenko @ 2005-03-26 18:02 UTC (permalink / raw)
  To: community

Hello community,
  Запарился уже смертельно. bog.pp.ru и подобные не помогают.
  Хочется transparent proxy на squid и iptables. Читал доки, сделал
  так(На выходе из локалки ,на роутере на АЛМ 2.4):
  в squid.conf:
http_port 3128
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

в iptables добавил:
iptables -t nat -A PREROUTING -i eth1 -d ! 192.168.3.0/24 -p tcp
--destination-port 80 -j REDIRECT --to-ports 3128

И не работает. Что можно попробовать?

ЗЫ. в cache.log не понимаю двух строк:
sendto FD 12:(1) Operation not permitted
ipcCreate: CHILD: hello write test failed
Особенно напрягает вторая. С чем это может быть связано?

-- 
Best regards,
 Igor                          mailto:ishevchenko@emdev.ru



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Comm] squid transparenr proxy
  2005-03-26 18:02 [Comm] squid transparenr proxy Igor Shevchenko
@ 2005-03-28  8:20 ` Olvin
  2005-03-28 15:33   ` Re[2]: " Igor Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Olvin @ 2005-03-28  8:20 UTC (permalink / raw)
  To: community

Igor Shevchenko wrote:
>   Запарился уже смертельно. bog.pp.ru и подобные не помогают.
>   Хочется transparent proxy на squid и iptables. Читал доки, сделал
>   так(На выходе из локалки ,на роутере на АЛМ 2.4):
>   в squid.conf:
> http_port 3128
> httpd_accel_host virtual
> httpd_accel_port 80
> httpd_accel_with_proxy on
> httpd_accel_uses_host_header on
> 
> в iptables добавил:
> iptables -t nat -A PREROUTING -i eth1 -d ! 192.168.3.0/24 -p tcp
> --destination-port 80 -j REDIRECT --to-ports 3128
> 
> И не работает. Что можно попробовать?

iptables -t nat -A PREROUTING -s 10.1.0.0/16 -i eth1 -p tcp -m tcp 
--dport 80 -j REDIRECT --to-ports 3128

Работает. Три внутренних сети вида 10.1.X.0/24


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re[2]: [Comm] squid transparenr proxy
  2005-03-28  8:20 ` Olvin
@ 2005-03-28 15:33   ` Igor Shevchenko
  2005-03-28 18:10     ` Мар'ян Петришин
  0 siblings, 1 reply; 5+ messages in thread
From: Igor Shevchenko @ 2005-03-28 15:33 UTC (permalink / raw)
  To: community

Hello Olvin,

Monday, March 28, 2005, 12:20:39 PM, you wrote:

> Igor Shevchenko wrote:
>>   Запарился уже смертельно. bog.pp.ru и подобные не помогают.
>>   Хочется transparent proxy на squid и iptables. Читал доки, сделал
>>   так(На выходе из локалки ,на роутере на АЛМ 2.4):
>>   в squid.conf:
>> http_port 3128
>> httpd_accel_host virtual
>> httpd_accel_port 80
>> httpd_accel_with_proxy on
>> httpd_accel_uses_host_header on
>> 
>> в iptables добавил:
>> iptables -t nat -A PREROUTING -i eth1 -d ! 192.168.3.0/24 -p tcp
>> --destination-port 80 -j REDIRECT --to-ports 3128
>> 
>> И не работает. Что можно попробовать?

> iptables -t nat -A PREROUTING -s 10.1.0.0/16 -i eth1 -p tcp -m tcp 
> --dport 80 -j REDIRECT --to-ports 3128
Ни фига не помогает:(
Может дело в том, что squid на роутере с маскарадингом?

-- 
Best regards,
 Igor                            mailto:ishevchenko@emdev.ru



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Comm] squid transparenr proxy
  2005-03-28 15:33   ` Re[2]: " Igor Shevchenko
@ 2005-03-28 18:10     ` Мар'ян Петришин
  2005-04-05 15:21       ` [Comm] squid transparenr proxy - more info Igor Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Мар'ян Петришин @ 2005-03-28 18:10 UTC (permalink / raw)
  To: community

Igor Shevchenko wrote:
> Hello Olvin,
> 
> Monday, March 28, 2005, 12:20:39 PM, you wrote:
> 
> 
>>Igor Shevchenko wrote:
>>
>>>  Запарился уже смертельно. bog.pp.ru и подобные не помогают.
>>>  Хочется transparent proxy на squid и iptables. Читал доки, сделал
>>>  так(На выходе из локалки ,на роутере на АЛМ 2.4):
>>>  в squid.conf:
>>>http_port 3128
>>>httpd_accel_host virtual
>>>httpd_accel_port 80
>>>httpd_accel_with_proxy on
>>>httpd_accel_uses_host_header on
>>>
>>>в iptables добавил:
>>>iptables -t nat -A PREROUTING -i eth1 -d ! 192.168.3.0/24 -p tcp
>>>--destination-port 80 -j REDIRECT --to-ports 3128
>>>
>>>И не работает. Что можно попробовать?
> 
> 
>>iptables -t nat -A PREROUTING -s 10.1.0.0/16 -i eth1 -p tcp -m tcp 
>>--dport 80 -j REDIRECT --to-ports 3128
> 
> Ни фига не помогает:(
> Может дело в том, что squid на роутере с маскарадингом?
> 

Строчки реально работающие.
А можно конфиг вашего файрвола?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Comm] squid transparenr proxy - more info
  2005-03-28 18:10     ` Мар'ян Петришин
@ 2005-04-05 15:21       ` Igor Shevchenko
  0 siblings, 0 replies; 5+ messages in thread
From: Igor Shevchenko @ 2005-04-05 15:21 UTC (permalink / raw)
  To: community

Hello Мар'ян,

Monday, March 28, 2005, 10:10:58 PM, you wrote:

> Строчки реально работающие.
> А можно конфиг вашего файрвола?
  Ситуция такая:
  запускаю сквид: service squid start
  в squid.conf:
>>>http_port 3128
>>>httpd_accel_host virtual
>>>httpd_accel_port 80
>>>httpd_accel_with_proxy on
>>>httpd_accel_uses_host_header on
  плюс
iptables -t nat -A PREROUTING -i eth1 -d ! 192.168.3.0/24 -p tcp--destination-port 80 -j REDIRECT --to-ports 3128

трафик с/на 80 и 3128 порты пропускается
полностью(INPUT,OUTPUT,FORWARD - всё ACCEPT).
Пытаюсь загрузить страницу из локалки - не грузится.

При попытке service squid restart получаю service squid is not
running, хотя на ps -aux|grep squid получаю три процесса:
root(...)/usr/sbin/squid -D
squid(...)(squid) -D
squid(...)(unlinkd)

В логах:
cache.log:
2005/04/05 19:07:05| Starting Squid Cache version 2.5.STABLE6 for i586-alt-linux-gnu...
2005/04/05 19:07:05| Process ID 4748
2005/04/05 19:07:05| With 16384 file descriptors available
2005/04/05 19:07:05| DNS Socket created at 0.0.0.0, port 1139, FD 4
2005/04/05 19:07:05| Adding nameserver 192.168.2.1 from /etc/resolv.conf
2005/04/05 19:07:05| User-Agent logging is disabled.
2005/04/05 19:07:05| Unlinkd pipe opened on FD 9
2005/04/05 19:07:05| Swap maxSize 102400 KB, estimated 7876 objects
2005/04/05 19:07:05| Target number of buckets: 393
2005/04/05 19:07:05| Using 8192 Store buckets
2005/04/05 19:07:05| Max Mem  size: 32768 KB
2005/04/05 19:07:05| Max Swap size: 102400 KB
2005/04/05 19:07:05| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2005/04/05 19:07:05| Rebuilding storage in /var/spool/squid (DIRTY)
2005/04/05 19:07:05| Using Least Load store dir selection
2005/04/05 19:07:05| Set Current Directory to /var/spool/squid
2005/04/05 19:07:05| Loaded Icons.
2005/04/05 19:07:05| Accepting HTTP connections at 0.0.0.0, port 3128, FD 10.
2005/04/05 19:07:05| Accepting SNMP messages on port 3401, FD 11.
2005/04/05 19:07:05| WCCP Disabled.
2005/04/05 19:07:05| sendto FD 12: (1) Operation not permitted
2005/04/05 19:07:05| ipcCreate: CHILD: hello write test failed

syslog/alert:
Apr  5 19:01:55 skunk (squid): Cannot open HTTP Port
Apr  5 19:02:09 skunk last message repeated 4 times
Apr  5 19:02:09 skunk squid[4550]: Exiting due to repeated, frequent failures

При этом на 80 порту никто не висит, тот же apache просто не стоит.
Что можно попробовать?
-- 
Best regards,
 Igor                            mailto:ishevchenko@emdev.ru



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-04-05 15:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-26 18:02 [Comm] squid transparenr proxy Igor Shevchenko
2005-03-28  8:20 ` Olvin
2005-03-28 15:33   ` Re[2]: " Igor Shevchenko
2005-03-28 18:10     ` Мар'ян Петришин
2005-04-05 15:21       ` [Comm] squid transparenr proxy - more info Igor Shevchenko

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git