From owner-freebsd-questions Sun Dec 10 19:48: 1 2000 From owner-freebsd-questions@FreeBSD.ORG Sun Dec 10 19:47:59 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from www.newsindex.com (www.newsindex.com [64.71.138.178]) by hub.freebsd.org (Postfix) with ESMTP id CFDBF37B400 for ; Sun, 10 Dec 2000 19:47:58 -0800 (PST) Received: from localhost (speck@localhost) by www.newsindex.com (8.9.3/8.9.3) with ESMTP id TAA18340; Sun, 10 Dec 2000 19:47:43 -0800 (PST) (envelope-from speck@www.newsindex.com) Date: Sun, 10 Dec 2000 19:47:43 -0800 (PST) From: Sean Peck To: David Raistrick Cc: Chris Hill , freebsd-questions@FreeBSD.ORG Subject: Re: Configuring Gateway/NAT on Freebsd In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: speck@www.newsindex.com Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Sun, 10 Dec 2000, Sean Peck wrote: > > > > I have one machine, that has 1 NIC card, this card is configured with the > > ifconfig commands to be listening to both 1 public IP address, and to > > 172.16.0.1 > > > I have configured tun0 to be 172.16.0.1 to public IP (or at least I > > believe I have) > > Ok, this appears to be one of the problems. > > tun0 is for userland ppp (vs ppp0 for kernel ppp) > > You do not need it. Ok, can remove. > What you DO need (and i'll note that I can only say this in concept. I've > not dealt with nat on a BSD machine since 2.2something..but i do it all > day long with Cisco:) is to > > ifconfig xl0 inet 64.2.61.236 netmask 255.255.255.0 (assuming that > 64...236 is the IP assigned by your provider, netmask as well) > route add default 64.2.61.X (as provided by the ISP for your default > route) This is correct > then, > > ifconfig xl0 alias 172.16.0.1 netmask 255.255.255.0 Have this > > Then you need to configure natd to use xl0 for all outbound traffic, with > the 64.2.61.236 IP. > > so ( a quick scan of man natd ) > > natd -a 63.2.61.236 > > might do it. > > Of course, all this assumes > sysctl -w net.inet.ip.forwarding=1 > Ok, how would I do this using in the rc.conf file? or do I add both of these lines to rc.local? The sysctl line says operation not permitted, but have not tried as root yet... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message