ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Denis Nazarov <marsden@mail.ru>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: Re: [Comm] iptables и переброска порта
Date: Wed, 29 Apr 2009 20:43:05 +0600
Message-ID: <200904292043.05416.marsden@mail.ru> (raw)
In-Reply-To: <49F856A2.8050902@aston.ru>

On Wednesday 29 April 2009 19:31:14 Roman V. Tutov wrote:
> возникла необходимость перебросить порт 3389 с машины в локалке на
> внешний интерфейс машины выполняющей роль gw aaa.aaa.aaa.aaa - внешний
> интерфейс шлюзовой машины
> bbb.bbb.bbb.bbb- адрес машины внутри сети порт которой нужно перебросить
> вовне
>
> контрукция вида
> iptables -t nat -A PREROUTING -p tcp  -d aaa.aaa.aaa.aaa --dport 3389 -j
> DNAT --to-destination bbb.bbb.bbb.bbb:3389 вполне работает , но хочеться
> чтоб это правило было не для всего интернета а для конкретных адресов
> т.е я хочу указать "-dst" но для нескольких адресов
>
> собственно как ?

я бы рекомендовал на внешнем интерфейсе слушать не 3389, а какой 
нибудь "левый" порт, например  - 32451, тогда из линукса будет 
rdesktop xx.xx.xx.xx:32451, в винде же просто вбить xx.xx.xx.xx:32451 в 
окне подключения к удаленному раб. столу. По крайней мере тупой взлом 
перебором логинов-паролей будет сильно затруднен. А вот внутри уже 
отправлять на 3389. таким образом у меня работает
iptables -t nat -A PREROUTING -p tcp -d ааа.ааа.ааа.ааа --dport 32451 -j 
DNAT --to-destination bbb.bbb.bbb.bbb:3389



      parent reply	other threads:[~2009-04-29 14:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-29 13:31 Roman V. Tutov
2009-04-29 13:35 ` AShen
2009-04-29 13:45 ` Timur Batyrshin
2009-04-29 13:55   ` Roman V. Tutov
2009-04-29 14:51     ` Владимир Кутявин
2009-04-29 13:56 ` Владимир Кутявин
2009-04-30  4:31   ` Serge
2009-04-30  8:15     ` Владимир Кутявин
2009-04-30 13:47       ` Serge
2009-04-30 15:22         ` Владимир Кутявин
2009-04-29 14:43 ` Denis Nazarov [this message]

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=200904292043.05416.marsden@mail.ru \
    --to=marsden@mail.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