ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Ivanov Maxim <ivanov@amos.ru>
To: "Alexey S. Kuznetsov" <community@altlinux.ru>
Subject: Re[2]: [Comm] IPtables вопрос
Date: Thu, 11 Nov 2004 17:17:25 +0300
Message-ID: <1492128671.20041111171725@amos.ru> (raw)
In-Reply-To: <688962595.20041111153304@vostok.net.ua>

Здравствуйте, Alexey.

Вы писали 11 ноября 2004 г., 16:33:04:

> Hello!

> Вы писали 11 листопада 2004 р., 15:22:41:

>> Здравствуйте, 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

>> Это часом уже не бред попер?

> пиши iptables -A INPUT -s !$INT_NET -d $INT_IP -p tcp --dport 25 -j ACCEPT
>      -//- --dport 110 -j ACCEPT
Тут точно ACCEPT а не DROP или REJECT ??? Это 110-й порт...


>      iptables -A input -s 0/0 -d $INET_IP -p tcp --dport 25 -j ACCEPT
>      iptables -A input -s 0/0 -d $INET_IP -p tcp --dport 110 -j REJECT




_______________
С уважением,
Максим Иванов                        



  reply	other threads:[~2004-11-11 14:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-11 13:22 Ivanov Maxim
2004-11-11 13:33 ` Alexey S. Kuznetsov
2004-11-11 14:17   ` Ivanov Maxim [this message]
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=1492128671.20041111171725@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