From owner-freebsd-net@FreeBSD.ORG Sat Jun 7 16:51:38 2014 Return-Path: Delivered-To: freebsd-net@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 4C360A1E for ; Sat, 7 Jun 2014 16:51:38 +0000 (UTC) Received: from nm32.bullet.mail.ne1.yahoo.com (nm32.bullet.mail.ne1.yahoo.com [98.138.229.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 097CF2E00 for ; Sat, 7 Jun 2014 16:51:37 +0000 (UTC) Received: from [127.0.0.1] by nm32.bullet.mail.ne1.yahoo.com with NNFMP; 07 Jun 2014 16:51:31 -0000 Received: from [98.138.226.176] by nm32.bullet.mail.ne1.yahoo.com with NNFMP; 07 Jun 2014 16:48:40 -0000 Received: from [98.139.212.150] by tm11.bullet.mail.ne1.yahoo.com with NNFMP; 07 Jun 2014 16:48:39 -0000 Received: from [98.139.212.213] by tm7.bullet.mail.bf1.yahoo.com with NNFMP; 07 Jun 2014 16:48:39 -0000 Received: from [127.0.0.1] by omp1022.mail.bf1.yahoo.com with NNFMP; 07 Jun 2014 16:48:39 -0000 X-Yahoo-Newman-Property: ymail-4 X-Yahoo-Newman-Id: 692139.15803.bm@omp1022.mail.bf1.yahoo.com Received: (qmail 55487 invoked by uid 60001); 7 Jun 2014 16:48:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1402159719; bh=BdSXr+3gCLZdMrY27cSgSNxM19tdGb8DnAUvHMGJRY8=; h=References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=lOMdIgplD2R3lsR4Dd9pCCvmiukF6I9mlXSDBlbjcfu8D2h2Vrh+W3CXHYBF6jy6ZRzsVTK7r02pLW37lLL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bnRlcmZhY2Ugb2YgbXkgRnJlZUJTRAoKLi4uIGFuZCBteSBjbGkBMAEBAQE- X-Mailer: YahooMailWebService/0.8.190.668 References: <1402122166.37214.YahooMailNeo@web162101.mail.bf1.yahoo.com> <20140607144043.3d4be435@X220.alogt.com> Message-ID: <1402159719.88183.YahooMailNeo@web162105.mail.bf1.yahoo.com> Date: Sat, 7 Jun 2014 09:48:39 -0700 (PDT) From: None Secure Reply-To: None Secure Subject: Re: Can you create a FreeBSD gateway, with private IPs, without NAT/divert ? To: Erich Dollansky In-Reply-To: <20140607144043.3d4be435@X220.alogt.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2014 16:51:38 -0000 Yes, but in this case BOTH IPs of the gateway - both the external and the i= nternal interfaces - are non-routable IPs, and so is my ISP cable modem.=0A= =0A192.168.1.1 is the cable modem=0A192.168.1.2 is external interface of my= FreeBSD=0A10.10.10.1 is internal interface of my FreeBSD=0A=0A... and my c= lient (10.10.10.2) could not get through to the outside world using just pl= ain old gateway_enable=3Dyes. =A0The configuration that always works with r= eal IPs did not work with this.=0A=0ASo, I followed the FreeBSD handbook wh= ich uses divert and natd, and it worked perfectly.=0A=0ANo, I am not trying= to access the internal systems from the outside world - I don't have a nee= d for that.=0A=0ABUT, I am wondering if it is any way possible to run a gat= eway like this *without* divert and natd ?=0A=0AThanks.=0A=0A=0AOn Friday, = June 6, 2014 11:40 PM, Erich Dollansky wrote:=0A =0A=0A= =0AHi,=0A=0A=0AOn Fri, 6 Jun 2014 23:22:46 -0700 (PDT)=0ANone Secure via fr= eebsd-net wrote:=0A=0A> BUT, what if my ISP is gi= ving me a private IP, and my internal=0A> network is also private IPs ? =A0= External gateway address is=0A> 192.168.1.2 and internal gateway address is= 10.10.10.1 ... the ONLY=0A> way I could make this work is with natd and ip= fw divert rules.=0A> =0A> My question is: =A0is it possible to have a netwo= rk of non-routable=0A> IPs, and a gateway with non-routable Ips on internal= and external=0A> interfaces, and NOT use natd/divert ? =A0Can it be done w= ith no ipfw=0A> rules at all, just like I used to ?=0A> =0Awhat should be t= he problem? I did some time ago when the ISP gave us=0Aonly a single IP add= ress. The local machines connected to the gateway,=0Athe gateway connected = via a second interface to the ISP.=0A=0AOf course, only the gateway was vis= ible from outside. If you want to=0Aaccess the internal machines from outis= de, you will need NAT. =0A=0AErich From owner-freebsd-net@FreeBSD.ORG Sat Jun 7 16:56:25 2014 Return-Path: Delivered-To: freebsd-net@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 C2245D2A for ; Sat, 7 Jun 2014 16:56:25 +0000 (UTC) Received: from mail-ve0-x233.google.com (mail-ve0-x233.google.com [IPv6:2607:f8b0:400c:c01::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 7CE322E49 for ; Sat, 7 Jun 2014 16:56:25 +0000 (UTC) Received: by mail-ve0-f179.google.com with SMTP id oy12so4841867veb.38 for ; Sat, 07 Jun 2014 09:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=UfyZY5O4Q0Xn7C/B9wBPK4GFkaGQOVr9hYmf/+X2IJc=; b=gph9ebqg2FJd/nvwOxDg7VFN0QxlVBR8hEV8tpQufhhwUIvpKxozuEdjhKT4BMwmU3 sbcPQ+aKaoAPTc/36zby+FGAWJYKVW7HSDKl05IhwPOneH5RMaKz/cMDjn+mayTej268 KyJnFV+GRLEnPsMaAwR7RGeC2D9U3kZyTp2us4aAdILpQkHopSWbRmNavB1f2/HS61FD JhLjhXNtjOclRMSvviF7xX1w1W/oBr6mraby4CztdEw1EY0qCboCjxPGKDRQ9kltn8CI rjvE9IRMVh2AyZDBrxQ1gm6KXEb96WtlzAhCsOLkrTY+E50yRRsHo3EX+eOFv/GViEo/ zP5A== MIME-Version: 1.0 X-Received: by 10.58.160.134 with SMTP id xk6mr12108202veb.64.1402160184630; Sat, 07 Jun 2014 09:56:24 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.220.186.193 with HTTP; Sat, 7 Jun 2014 09:56:24 -0700 (PDT) In-Reply-To: <1402159719.88183.YahooMailNeo@web162105.mail.bf1.yahoo.com> References: <1402122166.37214.YahooMailNeo@web162101.mail.bf1.yahoo.com> <20140607144043.3d4be435@X220.alogt.com> <1402159719.88183.YahooMailNeo@web162105.mail.bf1.yahoo.com> Date: Sat, 7 Jun 2014 12:56:24 -0400 X-Google-Sender-Auth: rG7tNweuDxnYkuKVTEbFdy2rJHI Message-ID: Subject: Re: Can you create a FreeBSD gateway, with private IPs, without NAT/divert ? From: Adrian Chadd To: None Secure Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-net@freebsd.org" , Erich Dollansky X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2014 16:56:25 -0000 On 7 June 2014 12:48, None Secure via freebsd-net wrote: > Yes, but in this case BOTH IPs of the gateway - both the external and the internal interfaces - are non-routable IPs, and so is my ISP cable modem. > > 192.168.1.1 is the cable modem > 192.168.1.2 is external interface of my FreeBSD > 10.10.10.1 is internal interface of my FreeBSD > > ... and my client (10.10.10.2) could not get through to the outside world using just plain old gateway_enable=yes. The configuration that always works with real IPs did not work with this. > > So, I followed the FreeBSD handbook which uses divert and natd, and it worked perfectly. > > No, I am not trying to access the internal systems from the outside world - I don't have a need for that. > > BUT, I am wondering if it is any way possible to run a gateway like this *without* divert and natd ? There's inkernel natd these days. There's also pf and ipfilter. -a