From owner-freebsd-questions Sat Jul 6 5:33:49 2002 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 57ACC37B400 for ; Sat, 6 Jul 2002 05:33:47 -0700 (PDT) Received: from wonkity.com (wonkity.com [63.93.4.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6F3843E09 for ; Sat, 6 Jul 2002 05:33:46 -0700 (PDT) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost.wonkity.com [127.0.0.1]) by wonkity.com (8.12.1/8.11.6) with ESMTP id g66CXjuF034927; Sat, 6 Jul 2002 06:33:46 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.12.1/8.12.1/Submit) with ESMTP id g66CXjFT034924; Sat, 6 Jul 2002 06:33:45 -0600 (MDT)?g (envelope-from wblock@wonkity.com) Date: Sat, 6 Jul 2002 06:33:45 -0600 (MDT) From: Warren Block To: Grant Cooper Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Executing lines in rc.conf In-Reply-To: <000501c22456$13c41480$040a0a0a@ab.hsia.telus.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Fri, 5 Jul 2002, Grant Cooper wrote: > # /sbin/natd -n vr0 > # /sbin/ipfw add 100 divert natd all from any to any via vr0 > > I can add enter these lines manually through the command lines but I don't > know how to add them to /etc/rc.conf everytime and execute it. The book I > have says to enter the lines above. So I am now asking the Networking Gods > for help. Sometimes the easiest way to find this kind of stuff is to look at /etc/defaults/rc.conf. That has the default settings for all kinds of things; I think you'll end up adding this to rc.conf: natd_enable="YES" natd_interface="vr0" natd_flags="-n" firewall_enable="YES" firewall_script="/etc/rc.firewall" firewall_type="OPEN" firewall_quiet="YES" Note that firewall_type line: it leaves everything wide open, not just vr0. Probably you'll end up writing your own list of firewall rules and adding them to /etc/rc.firewall. Copy one of the sections in there and make your adjustments, then change firewall_type to use that section. -Warren Block * Rapid City, South Dakota USA To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message