From owner-freebsd-questions@FreeBSD.ORG Wed Aug 13 17:50:21 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F069149 for ; Wed, 13 Aug 2014 17:50:21 +0000 (UTC) Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [IPv6:2607:f8b0:400e:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6806F27E9 for ; Wed, 13 Aug 2014 17:50:21 +0000 (UTC) Received: by mail-pa0-f51.google.com with SMTP id ey11so96534pad.10 for ; Wed, 13 Aug 2014 10:50:21 -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=VgIZY1qKBQYcSgeyquG/0wg3CnhosM/F/smbPQmDehw=; b=hEOn6xJ7cUg8CSBUCF2m8ZDeR2YG/Fv8D1pk0l9PhVLy7FKr50BH6AyP7xEN3cUAsK BBS8exWS6msZ22mjjdnKnN9ffbdLFTV96HHlIJ1SzRVAZMGdd5CUv4CNVTOVbXatte/q lXDRa4g30rwxSsKLo6UETZ/YpTPb8ffIjCbZK+dVqlyh1GantCtNx0wp5n758v4eL9ji Eu1m7swjiBzMnwUnoYrzpq6KmoHY9OMKfmb0GY8h1W0hA5YfrVU2h3gThjTFrC0T2RhR 1gceg93xTmx2LV86JMEtMcn9X4OaFTAd0tZI7nabqHBhRitvgVgR85XNb+xIRakY7Fog tKRQ== MIME-Version: 1.0 X-Received: by 10.66.150.5 with SMTP id ue5mr5110865pab.129.1407952221037; Wed, 13 Aug 2014 10:50:21 -0700 (PDT) Received: by 10.70.118.132 with HTTP; Wed, 13 Aug 2014 10:50:20 -0700 (PDT) In-Reply-To: <3hYH0x3vTtzCy1h@baobab.bilink.it> References: <3hYH0x3vTtzCy1h@baobab.bilink.it> Date: Wed, 13 Aug 2014 12:50:20 -0500 Message-ID: Subject: Re: NAT question From: Adam Vande More To: Luciano Mannucci Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: FreeBSD Mailing List X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 17:50:21 -0000 On Wed, Aug 13, 2014 at 11:48 AM, Luciano Mannucci wrote: > > Hello, I'm still migrating machines from linux to FreeBSD. I'm wondering if > my translation from this iptables linux rule > > iptables -t nat -A POSTROUTING -s 192.168.7.234/32 -d 172.16.1.0/24 -o > eth1 -j > MASQUERADE > > (which means moreless if Mr 192.168.7.234 wherever he comes fom passes > through our eth1 interface to go to 172.16.1 network should get our > eth1 address instead of his) > > is moreless correctly translated in FreeBSD ipnat rules as > > map em0 192.168.7.234/32 -> 0/32 > > or I'm missing something? You might want to use a more integrated and supported FW such as IPFW or PF to do NAT. -- Adam