From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <42E9C6B5.7080707@rambler.ru> Date: Fri, 29 Jul 2005 09:03:33 +0300 From: Olvin User-Agent: Mozilla Thunderbird 0.6 (X11/20040511) X-Accept-Language: en-us, en MIME-Version: 1.0 To: community@altlinux.ru Subject: Re: [Comm] iptables ? References: In-Reply-To: Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 8bit X-Auth-User: olvin, whoson: (null) X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: community@altlinux.ru List-Id: Mailing list for ALT Linux users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2005 06:03:32 -0000 Archived-At: List-Archive: List-Post: Санек Самойлов 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