From: Ivanov Maxim <ivanov@amos.ru>
To: "community@altlinux.ru" <community@altlinux.ru>
Subject: [Comm] IPtables вопрос
Date: Thu, 11 Nov 2004 16:22:41 +0300
Message-ID: <135803209.20041111162241@amos.ru> (raw)
Здравствуйте, community.
На серваке (он же шлюз в интернет) есть почтовый сервер - две сетвухи
- eth0 и eth1 - соответственно вовнутрь и наружу.
Хочу сделать так, чтобы только этот сервер и только он мог ходить по
25 порту (SMTP), принимать запросы на 110-й (POP3) только изнутри сети
и убивать все остальные запросы на eth1 относительно коннекта на
110-й порт.
пишу:
$IPT -A INPUT -p TCP -i $LOCAL_IFACE --destination-port 25 -j ACCEPT
$IPT -A INPUT -p TCP -i $LOCAL_IFACE --destination-port 110 -j ACCEPT
$IPT -A INPUT -p TCP -i $INET_IFACE --destination-port 25 -j ACCEPT
$IPT -A INPUT -p TCP -i $INET_IFACE --destination-port 110 -j DROP
Но закралась подленькая мыслишка: а не требуется ли еще и переброс
портов делать с внешнего интерфейса на внутренний? Ну типа
$IPT -A FORWARD -p TCP -i $INET_IFACE --destanation-port 25 \
--destanation 192.168.0.65 -j ACCEPT
$IPT -A FORWARD -p TCP -i $INET_IFACE --destanation-port 25 ACCEPT
$IPT -t NAT -A PREROUTING -p TCP -i $INET_IFACE -dport 25:25 \
--to-destination 192.168.0.65:25
$IPT -t NAT -A PREROUTING -p TCP -i $LOCAL_IFACE -dport 25:25 \
--destination $INET_ADDRESS -j DNAT --to-destination 192.168.0.65:25
Это часом уже не бред попер?
________________
С уважением,
Максим Иванов
next reply other threads:[~2004-11-11 13:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-11 13:22 Ivanov Maxim [this message]
2004-11-11 13:33 ` Alexey S. Kuznetsov
2004-11-11 14:17 ` Re[2]: " Ivanov Maxim
2004-11-11 14:24 ` Re[3]: " Ivanov Maxim
2004-11-11 15:05 ` Dmitry Lebkov
2004-11-11 14:34 ` Alexey S. Kuznetsov
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=135803209.20041111162241@amos.ru \
--to=ivanov@amos.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