From: Ivan Fedorov <ns@altlinux.org>
To: sysadmins@lists.altlinux.org
Subject: Re: [Sysadmins] 2IP на одном порту
Date: Mon, 08 Jun 2009 01:31:36 +0400
Message-ID: <m3iqj7pw7b.fsf@thinkpad.oxyum.localnet> (raw)
In-Reply-To: <463638558.20090608003543@3436.ru>
[-- Attachment #1: Type: text/plain, Size: 1101 bytes --]
"Denis S. Kostin" <admin-Fk1dS/Hm+zU@public.gmane.org> writes:
>> Необходимо, чтобы почта принималась и отправлялась всегда с 1
>> конкретного IP, висящего на внешнем интерфейсе (условный eth0).
>
>> Так?
> да
Ну тогда я бы предложил делать так:
EXT_IF=eth0
EXT_BASE_IP=100.1.1.1
# aka eth0:1 в терминах ifconfig, который пора начать забывать
# в пользу iproute2 (hint: ip a) :)
EXT_MAIL_IP=200.2.2.2
MAIL_VE_IP=10.10.10.10
iptables -t nat -A PREROUTING -d $EXT_MAIL_IP -p tcp --dport 25 \
-j DNAT --to-destination $MAIL_VE_IP
iptables -t nat -A POSTROTING -s $MAIL_VE_IP -o $EXT_IF \
-j SNAT --to-source $EXT_MAIL_IP
ну и в первом правиле можно вспомнить про multiport и прописать
smtps,imap(s), pop3(s), ssh, etc...
А про то, как делать на bridge вам рассказали в соседнем письме.
[-- Attachment #2: Type: application/pgp-signature, Size: 196 bytes --]
next prev parent reply other threads:[~2009-06-07 21:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-07 7:50 Denis S. Kostin
2009-06-07 10:39 ` Ivan Fedorov
2009-06-07 15:28 ` Michael Shigorin
2009-06-07 18:04 ` Ivan Fedorov
2009-06-07 18:13 ` Konstantin Pavlov
2009-06-07 20:14 ` [Sysadmins] [JT] " Ivan Fedorov
2009-06-07 20:23 ` Denis S. Kostin
2009-06-07 20:29 ` [Sysadmins] " Ivan Fedorov
2009-06-07 20:35 ` Denis S. Kostin
2009-06-07 21:31 ` Ivan Fedorov [this message]
2009-06-07 20:56 ` Afanasov Dmitry
2009-06-07 18:21 ` Denis S. Kostin
2009-06-07 18:37 ` Michael Shigorin
2009-06-07 20:12 ` Ivan Fedorov
2009-06-08 12:07 ` [Sysadmins] [JT] " Michael Shigorin
2009-06-07 20:16 ` [Sysadmins] " Ivan Fedorov
2009-06-12 15:19 ` George V. Kouryachy
2009-06-13 21:14 ` Michael Shigorin
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=m3iqj7pw7b.fsf@thinkpad.oxyum.localnet \
--to=ns@altlinux.org \
--cc=sysadmins@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 sysadmins discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/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 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
public-inbox-index sysadmins
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sysadmins
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git