From owner-freebsd-ipfw@FreeBSD.ORG Thu Jun 8 07:15:07 2006 Return-Path: X-Original-To: freebsd-ipfw@freebsd.org Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8152F16A9E8 for ; Thu, 8 Jun 2006 04:40:37 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp1.yandex.ru (smtp1.yandex.ru [213.180.223.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C1CE43D70 for ; Thu, 8 Jun 2006 04:40:36 +0000 (GMT) (envelope-from bu7cher@yandex.ru) Received: from proxy.kirov.so-cdu.ru ([81.18.142.226]:14041 "EHLO [127.0.0.1]" smtp-auth: "bu7cher" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S2078314AbWFHEk0 (ORCPT ); Thu, 8 Jun 2006 08:40:26 +0400 Message-ID: <4487AA39.70308@yandex.ru> Date: Thu, 08 Jun 2006 08:40:25 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: mufalani References: <004101c68a88$7ecd58d0$0101a8c0@cristian2aebca> In-Reply-To: <004101c68a88$7ecd58d0$0101a8c0@cristian2aebca> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7BIT Cc: freebsd-ipfw@freebsd.org Subject: Re: ipfw + nat X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2006 07:15:18 -0000 mufalani wrote: > How to redirect requisitions at 80?s port (200.X.X.X:80) > to address (192.x.x.x:80) with nat and ipfw? You can try following: # natd -alias_address 200.X.X.X -redirect_port tcp 192.x.x.x:80 80 # ipfw add divert natd tcp from any to 200.X.X.X in recv $ExtIf # ipfw add divert natd tcp from 192.x.x.x 80 to any out xmit $ExtIf $ExtIf - external interface. -- WBR, Andrey V. Elsukov