From owner-freebsd-ipfw@FreeBSD.ORG Mon May 19 14:18:32 2008 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F1FC106566B for ; Mon, 19 May 2008 14:18:32 +0000 (UTC) (envelope-from oleksandr@samoylyk.sumy.ua) Received: from mail.telesweet.net (news.telesweet.net [194.110.252.16]) by mx1.freebsd.org (Postfix) with ESMTP id EECBE8FC1E for ; Mon, 19 May 2008 14:18:31 +0000 (UTC) (envelope-from oleksandr@samoylyk.sumy.ua) Received: from localhost (localhost [127.0.0.1]) by mail.telesweet.net (Postfix) with ESMTP id 18156B83B; Mon, 19 May 2008 17:18:29 +0300 (EEST) X-Virus-Scanned: by Telesweet Mail Virus Scanner X-Spam-Flag: NO X-Spam-Score: -1.44 X-Spam-Level: X-Spam-Status: No, score=-1.44 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1.44] Received: from [10.0.0.109] (pigeon-work.telesweet [10.0.0.109]) by mail.telesweet.net (Postfix) with ESMTP id 60BD9B825; Mon, 19 May 2008 17:18:14 +0300 (EEST) Message-ID: <48318C25.2090703@samoylyk.sumy.ua> Date: Mon, 19 May 2008 17:18:13 +0300 From: Oleksandr Samoylyk User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: Paolo Pisati References: <48307AAE.9010906@samoylyk.sumy.ua> <20080519141602.GB7648@tin.it> In-Reply-To: <20080519141602.GB7648@tin.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ipfw@freebsd.org Subject: Re: ipfw and smtp port rewriting 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: Mon, 19 May 2008 14:18:32 -0000 Paolo Pisati wrote: > On Sun, May 18, 2008 at 09:51:26PM +0300, Oleksandr Samoylyk wrote: >> Hello freebsd-ipfw, >> >> I'd like to make smtp port rewriting for any destination by means of ipfw. >> >> With iptables I just used this rule in order to achieve this functionality: >> >> iptables -t nat -A PREROUTING -i ppp+ -p tcp --dport 2525 -j DNAT >> --to-destination :25 > > ipfw nat 123 config redirect_port tcp YOURIP:2525 25 > ipfw add nat 123 tcp from any to any > > or something along the line. > Will it work for any destination? -- Oleksandr Samoylyk OVS-RIPE