From owner-freebsd-net@FreeBSD.ORG Sun Jun 30 11:48:34 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8DC1AB9E; Sun, 30 Jun 2013 11:48:34 +0000 (UTC) (envelope-from sodynet1@gmail.com) Received: from mail-pd0-x229.google.com (mail-pd0-x229.google.com [IPv6:2607:f8b0:400e:c02::229]) by mx1.freebsd.org (Postfix) with ESMTP id 666A91C5E; Sun, 30 Jun 2013 11:48:34 +0000 (UTC) Received: by mail-pd0-f169.google.com with SMTP id y10so1933791pdj.14 for ; Sun, 30 Jun 2013 04:48:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VnHWADKg64yNnvTVWEdGGb5hS2iAcVtiqsojmlhdSi8=; b=vzfxykxM/hTf7wzLAtm+ur+6qS6pmJArkaTsw/o1lAiaElwUruGhRH8NkVeiBT9iAC eLZKGMvMhYLmp4I4lMV89s2GTMGFiWJXz3am2TATVvFtNd3RP20PMOBM67rNzZTZi0Of eDWkvtmgOSH84z3DlTIoSsWjnGBtPQQ9iUic1myvcWsXAWNF4q0R6L1qsjYP1jc4UIp7 04dh6vEr+4aGjdt+jUT8wSiRZi6NRDD8UEHZAzB7V8ZUwz1w0JDfVvO/1tVWr/lMjWe9 bdXe7c64gXFyz5PzhNkV/DYaR1AW1iPfYAnDKag2G8lIwXKRKtpo8K2eIL5EVc6f21aE 2YwQ== MIME-Version: 1.0 X-Received: by 10.68.50.69 with SMTP id a5mr19343086pbo.122.1372592914141; Sun, 30 Jun 2013 04:48:34 -0700 (PDT) Received: by 10.70.96.139 with HTTP; Sun, 30 Jun 2013 04:48:34 -0700 (PDT) In-Reply-To: <51D006F6.6060809@grosbein.net> References: <20130629002959.GB20376@nat.myhome> <51D006F6.6060809@grosbein.net> Date: Sun, 30 Jun 2013 14:48:34 +0300 Message-ID: Subject: Re: DNAT in freebsd From: Sami Halabi To: Eugene Grosbein Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-net@freebsd.org" , "Paul A. Procacci" , freebsd-ipfw X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2013 11:48:34 -0000 Hi, I don't understand how reverse mode works exactly, and didn't find a good example. can you try and help on the configuration? Thanks in advance, Sami On Sun, Jun 30, 2013 at 1:22 PM, Eugene Grosbein wrote: > On 29.06.2013 13:50, Sami Halabi wrote: > > I think I was misunderstood... > > Here is the situation i want to handle: > > My box is a router that handles several /24 behind. > > One of my links (em0) is connected to a private network 192.168.0.1 is > me, > > my neighbour is 192.168.0.2. > > I want to make that any connection comes to 192.168.0.1 to go to ip > > 193.xxx.yyy.2 using specific public ip 84.xx.yy.1 > > And packets comming to my public 84.xx.yy.1 ip to be trsnslated as came > > from 192.168.0.1 and sent to 192.168.0.2/or ant other ips > > behind(192.168.1.xx/24). > > > > Hope that makes it clearer, and I appreciate any help. > > You need to setup 2 ipfw nat instanses, one to translate source IPs, > another to translate destination IPs (this one needs "reverse" mode). > > > -- Sami Halabi Information Systems Engineer NMS Projects Expert FreeBSD SysAdmin Expert