From owner-freebsd-questions Fri Feb 28 11:15:59 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A655837B410 for ; Fri, 28 Feb 2003 11:15:36 -0800 (PST) Received: from rambo.401.cx (rambo.401.cx [80.65.205.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52032442B8 for ; Fri, 28 Feb 2003 10:44:36 -0800 (PST) (envelope-from listsub@401.cx) Received: from 401.cx (rocky [192.168.0.2]) by rambo.401.cx (8.12.7/8.12.7) with ESMTP id h1SIiOuA096242; Fri, 28 Feb 2003 19:44:24 +0100 (CET) (envelope-from listsub@401.cx) Message-ID: <3E5FAE3A.4060701@401.cx> Date: Fri, 28 Feb 2003 19:45:14 +0100 From: "Roger 'Rocky' Vetterberg" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brian Henning Cc: freebsd Subject: Re: natd References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Brian Henning wrote: > My local network (192.168.1.0) consists of three machine BSD1 (192.168.1.40) and > BSD2 (192.168.1.42). Both of these machines use gateway/router (BSD3) > 192.168.1.254 > to access the internet. All of these machine are connected to a switch locally. > BSD3 connects to my isp and gets my single ip address that i want to share with > the > rest of my local network. Just a note, these machine get their ip addresses > staticly. > > on my router i recompiled the kernel with these options. > options IPFIREWALL > options IPFIREWALL_VERBOSE #firewall logging capability - optional > options IPFIREWALL_VERBOSE_LIMIT=100 #limit verbosity > options IPDIVERT #NATD > > i have not added anything to my rc.conf file as of yet. > Eventually i will set up natd and firewall settings in my rc.conf, but can > someone direct me on how to do this manually so i can access the internet > from anywhere on my network. > > r11 is my external network > rl0 is my internal network > > > >>natd -interface rl1 >>ipfw -f flush >>ipfw add divert natd all from any to any via rl1 >>ipfw add pass all from any to any > > > > does this seem correct? > > Thanks for any advice, > > Brian > Add 'sysctl -w net.inet.ip.forwarding=1' to the above commands and you should be surfing in no time. -- R To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message