ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Dmitry Belyayev <dima@dialogmedia.org>
To: community@altlinux.ru
Subject: Re: [Comm] iptables & ntp
Date: Tue, 27 Jul 2004 00:49:08 -0700
Message-ID: <20040727074908.GA821@dima.dima> (raw)
In-Reply-To: <4105E571.3000404@soc.adm.yar.ru>

On 09:17 Tue 27 Jul     , Дворников Михаил wrote:
> # iptables -t nat -A PREROUTING --dst $real_ip -p tcp --dport 123 \
> -j DNAT --to-destination 10.15.100.61

Для работы ntp достаточно udp.

> # iptables -t nat -A PREROUTING --dst $real_ip -p udp --dport 123 \
> -j DNAT --to-destination 10.15.100.61

И, как уже писали, нужно использовать POSTROUTING и SNAT.
То, что Вы делаете -- выброс порта 123 с 10.15.100.61 наружу -- к $real_ip

# iptables -t nat -A POSTROUTING --src 10.15.100.61 -p udp --dport ntp \
-j SNAT --to-source $real_ip

Так должно работать. Соответственно, должен быть включен форвард по 123 порту.

-- 

WBR, Dmitry Belyayev



  parent reply	other threads:[~2004-07-27  7:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-27  5:17 Дворников Михаил
2004-07-27  5:32 ` Mike Lykov
2004-07-27  5:42   ` [Comm] AverTV 305/ 307 на ядрах 2 .6 Anthony
2004-07-27  6:03     ` [Comm] Кто прожжёный гуру по вёрстке DVD ? Anthony
2004-07-27  6:12     ` [Comm] AverTV 305/ 307 на ядрах 2 .6 Andrey Rahmatullin
2004-07-27  6:14   ` [Comm] iptables & ntp Дворников Михаил
2004-07-27  6:26     ` Mike Lykov
2004-07-27  7:49 ` Dmitry Belyayev [this message]
2004-07-27  9:46 ` Alexey Borovskoy
2004-07-28  3:42   ` Mike Lykov
2004-07-28  4:16     ` harlan
2004-07-28  4:31       ` harlan
2004-07-28  4:28     ` Alexey Borovskoy
2004-07-28  4:53       ` Дворников Михаил

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=20040727074908.GA821@dima.dima \
    --to=dima@dialogmedia.org \
    --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