* [mdk-re] ðÏÍÏÇÉÔÅ ÎÁÓÔÒÏÉÔØ NAT × IPTABLES
@ 2001-10-11 14:38 Dmitry
2001-10-11 15:40 ` [mdk-re] Re: [mdk-re] Помогите настроить NAT в IPTABLES Vlad Drakula
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry @ 2001-10-11 14:38 UTC (permalink / raw)
To: mandrake-russian
Хочу сделать транспарант прокси для веб сервера во внутренней сети
(192.168.1.100) через Линукс бокс с поднятыми Iptables. Порылся в
доках и нарыл что-то вроде этого:
INET_IFACE="eth0"
LAN_IFACE="eth1"
IPTABLES="/sbin/iptables"
$IPTABLES -t nat -A POSTROUTING -o $INET_IFACE -j MASQUERADE
$IPTABLES -t nat -A PREROUTING -p tcp -d 1.2.3.4 --dport 80 -j DNAT --to 192.168.1.100
$IPTABLES -t nat -A POSTROUTING -o $INET_IFACE -j SNAT --to 1.2.3.4
Не работает АднАкА :(
Где тут грабли?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [mdk-re] Re: [mdk-re] Помогите настроить NAT в IPTABLES
2001-10-11 14:38 [mdk-re] ðÏÍÏÇÉÔÅ ÎÁÓÔÒÏÉÔØ NAT × IPTABLES Dmitry
@ 2001-10-11 15:40 ` Vlad Drakula
2001-10-12 11:25 ` [mdk-re] Re: [mdk-re] ðÏÍÏÇÉÔÅ ÎÁÓÔÒÏÉÔØ NAT × IPTABLES Dmitry
0 siblings, 1 reply; 4+ messages in thread
From: Vlad Drakula @ 2001-10-11 15:40 UTC (permalink / raw)
To: Dmitry
[-- Attachment #1: Type: text/plain, Size: 755 bytes --]
Hello Dmitry,
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> Где тут грабли?
Нате скриптик... Настройки и описание внутри... Заодно и брандмауэр :)
подымешь...
--
Best regards,
Vlad mailto:sib_drakula@intramail.ru
[-- Attachment #2: rc.firewall-2.3.6 --]
[-- Type: application/octet-stream, Size: 28657 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [mdk-re] Re: [mdk-re] ðÏÍÏÇÉÔÅ ÎÁÓÔÒÏÉÔØ NAT × IPTABLES
2001-10-11 15:40 ` [mdk-re] Re: [mdk-re] Помогите настроить NAT в IPTABLES Vlad Drakula
@ 2001-10-12 11:25 ` Dmitry
2001-10-12 12:16 ` [mdk-re] Re[2]: [mdk-re] Re: [mdk-re] Помогите настроить NAT в IPTABLES Vlad Drakula
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry @ 2001-10-12 11:25 UTC (permalink / raw)
To: Vlad Drakula
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [mdk-re] Re[2]: [mdk-re] Re: [mdk-re] Помогите настроить NAT в IPTABLES
2001-10-12 11:25 ` [mdk-re] Re: [mdk-re] ðÏÍÏÇÉÔÅ ÎÁÓÔÒÏÉÔØ NAT × IPTABLES Dmitry
@ 2001-10-12 12:16 ` Vlad Drakula
0 siblings, 0 replies; 4+ messages in thread
From: Vlad Drakula @ 2001-10-12 12:16 UTC (permalink / raw)
To: Dmitry
Hello Dmitry,
Friday, October 12, 2001, 1:26:40 PM, you wrote:
D> INET_IFACE="eth0"
D> LAN_IFACE="eth1"
D> IPTABLES="/sbin/iptables"
D> LAN_IP_RANGE="192.168.0.0/24"
D> $IPTABLES -t nat -A POSTROUTING -s $LAN_IP_RANGE -o $INET_IFACE -j MASQUERADE
D> $IPTABLES -t nat -A PREROUTING -p tcp -i $INET_IFACE --dport 80 -j DNAT --to-destination 192.168.1.100:80
D> $IPTABLES -t filter -A FORWARD -p tcp -d 192.168.1.100 --dport 80 -j ACCEPT
$IPTABLES -t nat -A PREROUTING -p tcp -i $INET_IFACE --dport 80 -j
REDICECT --to-destination 192.168.1.100:80
по идее должно хватить такой строчки, соотвественно данные
возвращаемые сервером должны нормально маскарадиться.
--
Best regards,
Vlad mailto:sib_drakula@intramail.ru
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-10-12 12:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-11 14:38 [mdk-re] ðÏÍÏÇÉÔÅ ÎÁÓÔÒÏÉÔØ NAT × IPTABLES Dmitry
2001-10-11 15:40 ` [mdk-re] Re: [mdk-re] Помогите настроить NAT в IPTABLES Vlad Drakula
2001-10-12 11:25 ` [mdk-re] Re: [mdk-re] ðÏÍÏÇÉÔÅ ÎÁÓÔÒÏÉÔØ NAT × IPTABLES Dmitry
2001-10-12 12:16 ` [mdk-re] Re[2]: [mdk-re] Re: [mdk-re] Помогите настроить NAT в IPTABLES Vlad Drakula
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