From: Владимир <fmfm@symmetron.msk.ru>
To: community@altlinux.ru
Subject: Re: [Comm] IPTABLES more problem
Date: Fri, 10 Jan 2003 10:32:59 +0300
Message-ID: <3E1E772B.5090009@symmetron.msk.ru> (raw)
In-Reply-To: <20030109111242.0e470ad3.gosha@zkb.ru>
Привет всем.
Igor Solovyov пишет:
>Как говорится "чем дальше в лес, тем больше дров".
>Исследование iptables, как замены ipchains продолжается
>и пока ничего хорошего я не добился. :-((
>
>
>
>2. Не работает REDIRECT. Во всяком случае, вот такая строка не работает:
>
>iptables -t nat -A PREROUTING -p tcp --destination-port 490 \
> -j DNAT --to-destination 192.168.63.120:490
>
>REDIRECT с машины 192.168.63.200:490 на машину 192.168.63.120:490
>не происходит. Никакой ругани в логах при этом нет. Сразу скажу,
>что во всех местах, где пакеты не пропускаются стоит -j LOG.
>А по логам видно, что при этом редиректе пакеты нигде не
>отфильтровываются, иначе я их увидел бы.
>Они просто исчезают в никуда. :-(((
>Проблему локализовать не удается.
>Пока приходится редиректить средствами xinetd.
>
>
Читайте документацию внимательней. REDIRECT это не DNAT!
В данном случае, если необходимо через посредника переадресовать
пакеты машине той же сети необходимы два взаимосвязанных правила, например.
iptables -t nat -A PREROUTING -p tcp -s 192.168.63.200 --dport 490 \
-j DNAT --to-destination 192.168.63.120
iptables -t nat -A POSTROUTING -p tcp -d 192.168.63.120 --dport 490 \
-j SNAT --to-source <ВНУТРЕННЙ IP АДРЕС ШЛЮЗА>
У Вас машина-получатель паектов (192.168.63.120) ответы шлет напрямую
отправителю
(192.168.63.200), так как машины находятся в одной локальной сети.
Отправитель же ждет
ответа от ШЛЮЗА и выбрасывает ответы как "незапрошенные".
На ШЛЮЗ ответы не посылаются, естественно, в LOG они не регистрируются.
--
Best regards
Vladimir
next prev parent reply other threads:[~2003-01-10 7:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-09 6:12 Igor Solovyov
2003-01-09 7:15 ` Ilia Menchikh
2003-01-09 7:57 ` Igor Solovyov
2003-01-09 8:20 ` Ilia Menchikh
2003-01-09 15:45 ` Igor Solovyov
2003-02-14 11:00 ` rider
2003-02-21 5:38 ` Igor Solovyov
2003-01-10 7:32 ` Владимир [this message]
2003-01-10 15:43 ` Igor Solovyov
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=3E1E772B.5090009@symmetron.msk.ru \
--to=fmfm@symmetron.msk.ru \
--cc=community@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