ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Dmitry <alexeyev@onlinx.prime-tass.ru>
To: Vlad Drakula <mandrake-russian@altlinux.ru>
Subject: Re: [mdk-re] Re: [mdk-re] ðÏÍÏÇÉÔÅ ÎÁÓÔÒÏÉÔØ NAT × IPTABLES
Date: Fri Oct 12 11:25:11 2001
Message-ID: <171322125091.20011012112640@onlinx.prime-tass.ru> (raw)
In-Reply-To: <71112433050.20011011173821@intramail.ru>

Hello Vlad,

Thursday, October 11, 2001, 3:38:21 PM, you wrote:

VD> Hello Dmitry,

VD> Thursday, October 11, 2001, 4:38:40 PM, you wrote:

D>> Хочу сделать транспарант прокси для веб сервера во внутренней сети
D>> (192.168.1.100) через Линукс бокс с поднятыми Iptables. Порылся в
D>> доках и нарыл что-то вроде этого:

D>> INET_IFACE="eth0"
D>> LAN_IFACE="eth1"
D>> IPTABLES="/sbin/iptables"

D>> $IPTABLES -t nat -A POSTROUTING -o $INET_IFACE -j MASQUERADE
D>> $IPTABLES -t nat -A PREROUTING -p tcp -d 1.2.3.4 --dport 80 -j DNAT --to 192.168.1.100
D>> $IPTABLES -t nat -A POSTROUTING -o $INET_IFACE -j SNAT --to 1.2.3.4


D>> Не работает АднАкА :(

D>> Где тут грабли?

VD> Нате скриптик... Настройки и описание внутри... Заодно и брандмауэр :)
VD> подымешь...


Брандмауэр поднят. Меня конкретно интересует IP Forwrding

 1.2.3.4:80   _______                    ________
------------>|       | 192.168.1.100:80 |        |
 x.x.x.x:x   | Linyx |----------------->|  WEB   |
<------------|_______|<----|            |________|
                           |192.168.1.1:xxx |
                           |________________|


Linux маскарадит и форвардит пакеты от клиента с 80 порта внешней
карточки на веб-сервер стоящий во внутренней сети, и ответ веб-сервера
обратно клиенту. Никак не допру как сделать.
Посмотрел скрипт,но вот такая фигня не работает! :(

INET_IFACE="eth0"
LAN_IFACE="eth1"
IPTABLES="/sbin/iptables"
LAN_IP_RANGE="192.168.0.0/24"

$IPTABLES -t nat -A POSTROUTING -s $LAN_IP_RANGE -o $INET_IFACE -j MASQUERADE
$IPTABLES -t nat -A PREROUTING -p tcp -i $INET_IFACE --dport 80 -j DNAT --to-destination 192.168.1.100:80
$IPTABLES -t filter -A FORWARD -p tcp -d 192.168.1.100 --dport 80 -j ACCEPT




  reply	other threads:[~2001-10-12 11:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-11 14:38 Dmitry
2001-10-11 15:40 ` [mdk-re] Re: [mdk-re] Помогите настроить NAT в IPTABLES Vlad Drakula
2001-10-12 11:25   ` Dmitry [this message]
2001-10-12 12:16     ` [mdk-re] Re[2]: " Vlad Drakula

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=171322125091.20011012112640@onlinx.prime-tass.ru \
    --to=alexeyev@onlinx.prime-tass.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