ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Albert R.Valiev" <arkstone@mail.ru>
To: mandrake-russian@altlinux.ru
Subject: Re: [mdk-re] Iptables & Squid
Date: Thu Sep 27 23:51:14 2001
Message-ID: <20010927174720.2EB144D613@laguna.ru> (raw)
In-Reply-To: <9389864508.20010926162850@intramail.ru>

26 Сентябрь 2001 14:28, Вы написали:
> Hello mandrake-russian,
>
>   Собственно интересно, как в связке iptables и squid сделать
>   принудительную работу клиентов через проксю?
Просто. В документации по squid это есть, но там описано применительно к 
ipchains. У меня это выглядит так:
Настройка squid - прочитаете в документации (по моему в MINI-HOWTO прямо так 
и есть - Linux transparent proxy HOWTO). 
Iptables:
есть два варианта, у меня работоспособным оказался первый:
задано:
ppp0 с адресом 1.2.3.4 - Internet интерфейс
eth0 с адресом 192.168.1.254 - сетевая карта локальной сети. Адреса в 
локальной сети имеют вид 192.168.1.$machine_address. В итоге команда, 
отправляющая весь www-трафик на прокси выглядит так:
iptables -t nat -A PREROUTING -p tcp -s 192.168.1.0/24 -d !192.168.1.0/24 
--destination-port 80 -j REDIRECT --to-ports 3128 (или какой там порт на 
вашем прокси). 
Да, в данном примере обязательными условиями являются:
1) Машина является маршрутизатором в Internet (т.е. все пакеты в Internet 
обязательно проходят через нее)
2) Прокси сервер установлен также на данной машине.

-- 
Xmms np: Duran Duran - Come Undone



      parent reply	other threads:[~2001-09-27 23:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-26 14:20 Vlad Drakula
2001-09-26 16:26 ` Yuri Borunov
2001-09-27 23:51 ` Albert R.Valiev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010927174720.2EB144D613@laguna.ru \
    --to=arkstone@mail.ru \
    --cc=mandrake-russian@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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