Date: Fri, 15 Feb 2002 19:26:47 +0100 From: Richard Nyberg <rnyberg@it.su.se> To: freebsd-stable@freebsd.org Subject: Suggestion on natd rc scripts Message-ID: <20020215192647.A23116@gromit.it.su.se>
next in thread | raw e-mail | index | archive | help
--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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020215192647.A23116>