ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Olvin <olvin@rambler.ru>
To: community@altlinux.ru
Subject: Re: [Comm] iptables ?
Date: Fri, 29 Jul 2005 09:03:33 +0300
Message-ID: <42E9C6B5.7080707@rambler.ru> (raw)
In-Reply-To: <web-150237401@mail5.rambler.ru>

Санек Самойлов wrote:
> Вот я умею,  ssh -gL 25:192.168.100.1:25 127.0.0.1    - перебросил 25 
> порт с хоста 192.168.100.1
> Как такое сделать в iptables ?
> Если не iptables  то где это лучше сделать ?

iptables -t nat -A PREROUTING -p tcp --dport $P1 -d $IP1 -s $IP0 -j DNAT 
--to-destination $IP2:$P2

iptables -t nat -A POSTROUTING -p tcp --dport $P2 -d $IP2 -s $IP0 -j 
SNAT --to-source $IP3

iptables -t filter -A FORWARD -p tcp -s $IP0 -d $IP2 -s $IP3 --dport $P2 
-j ACCEPT

За дальнейшей справкой - man iptables


      reply	other threads:[~2005-07-29  6:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-28 18:41 Санек Самойлов
2005-07-29  6:03 ` Olvin [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=42E9C6B5.7080707@rambler.ru \
    --to=olvin@rambler.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