From owner-freebsd-stable Fri Feb 15 10:27: 0 2002 Delivered-To: freebsd-stable@freebsd.org Received: from gromit.it.su.se (gromit.it.su.se [130.237.95.77]) by hub.freebsd.org (Postfix) with ESMTP id B17C137B402 for ; Fri, 15 Feb 2002 10:26:48 -0800 (PST) Received: (from rnyberg@localhost) by gromit.it.su.se (8.11.6/8.11.6) id g1FIQlR23163 for freebsd-stable@freebsd.org; Fri, 15 Feb 2002 19:26:47 +0100 (CET) (envelope-from rnyberg) Date: Fri, 15 Feb 2002 19:26:47 +0100 From: Richard Nyberg To: freebsd-stable@freebsd.org Subject: Suggestion on natd rc scripts Message-ID: <20020215192647.A23116@gromit.it.su.se> Mail-Followup-To: Richard Nyberg , freebsd-stable@freebsd.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="fdj2RfSjLxBAspz7" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I recently had some problem getting natd to start correctly from th rc scripts. The root of the problem was that I had all settings for natd in /etc/natd.conf and therefore only had the following relevant variables set in rc.conf: #First try natd_enable="YES" natd_flags="-f /etc/natd.conf" This doesn't work since natd_interface is set to fxp0 by default, which is wrong for me. So I tried again with the following: #Second try natd_enable="YES" natd_flags="-f /etc/natd.conf" natd_interface= Of course this doesn't work either since rc.network doesn't start natd if natd_interface is empty. Suggestion 1: Set natd_interface to nothing by default, and let rc.network start natd even if natd_interface isn't set. Suggestion 2: All who dare touch rc.conf should always thoroughly check the defaults and the relevant rc.* files or prepare being locked out from their computer and suffer terribly ;) Does any of this make sense to you? -Richard --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rc.network.diff" --- rc.network Wed Feb 13 20:31:20 2002 +++ rc.network.new Fri Feb 15 19:21:28 2002 @@ -342,6 +342,8 @@ fi echo -n ' natd'; ${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg} + else + echo -n ' natd'; ${natd_program:-/sbin/natd} ${natd_flags} fi ;; esac --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rc.conf.diff" --- rc.conf Wed Feb 13 20:29:02 2002 +++ rc.conf.new Fri Feb 15 19:25:29 2002 @@ -56,7 +56,7 @@ ipsec_file="/etc/ipsec.conf" # Name of config file for setkey natd_program="/sbin/natd" # path to natd, if you want a different one. natd_enable="NO" # Enable natd (if firewall_enable == YES). -natd_interface="fxp0" # Public interface or IPaddress to use. +natd_interface= # Public interface or IPaddress to use. natd_flags="" # Additional flags for natd. ipfilter_enable="NO" # Set to YES to enable ipfilter functionality ipfilter_program="/sbin/ipf" # where the ipfilter program lives --fdj2RfSjLxBAspz7-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message