From: "Alexey I. Froloff" <raorn@altlinux.ru>
To: Mailing list for ALT Linux users <community@lists.altlinux.org>
Subject: Re: [Comm] routing и NAT
Date: Fri, 21 Mar 2008 23:40:52 +0300
Message-ID: <20080321204052.GS1020@hell.fortress> (raw)
In-Reply-To: <47E4174D.3010407@rambler.ru>
[-- Attachment #1: Type: text/plain, Size: 665 bytes --]
* Olvin <olvin@> [080321 23:19]:
>> iptables -t nat -A POSTROUTING -s 192.168.0.1/24 -o eth0 -j SNAT --to-source REAL_IP
> А как насчёт "-j MASQUERADE" вместо "-j SNAT --to-source
> REAL_IP"? Пакетам из локалки вы подменяете адрес, а обратную
> подмену кто будет делать?
Ядро и будет делать. Для установленных соединенй. MASQUERADE
это такой "SNAT для бедных", когда нельзя точно определить
внешний адрес интерфейса (DHCP, DialUp, etc).
Вообще сами правила SNAT/DNAT/MASQUERADE применяются только к
первому пакету, который открывает соединение. Это утверждение
можно легко проверить посмотрев на counters в iptables -L.
--
Regards,
Sir Raorn.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-03-21 20:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-19 2:45 ` [Comm] настройка VPN Olvin
2008-03-18 18:44 ` [Comm] routing и NAT gladko
2008-03-18 17:51 ` Motsyo Gennadi aka Drool
2008-03-18 18:49 ` Владимир
2008-03-19 10:33 ` Serge
2008-03-20 8:05 ` Serge
2008-03-18 19:04 ` gladko
2008-03-18 19:09 ` Владимир
2008-03-20 4:44 ` Vyacheslav A. Brunev
2008-03-21 20:15 ` Olvin
2008-03-21 20:40 ` Alexey I. Froloff [this message]
2008-03-18 19:20 ` Vladimir V. Kamarzin
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=20080321204052.GS1020@hell.fortress \
--to=raorn@altlinux.ru \
--cc=community@lists.altlinux.org \
/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