From owner-freebsd-questions@FreeBSD.ORG Fri Jun 9 04:13:29 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 E50CE16A419 for ; Fri, 9 Jun 2006 04:13:29 +0000 (UTC) (envelope-from nick@nickwithers.com) Received: from mail.nickwithers.com (mail.manrags.com [203.219.206.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6A9C43D70 for ; Fri, 9 Jun 2006 04:13:28 +0000 (GMT) (envelope-from nick@nickwithers.com) Received: from localhost (shmick.shmon.net [10.0.0.252]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.nickwithers.com (Postfix) with ESMTP id D69A33AAA5; Fri, 9 Jun 2006 14:13:13 +1000 (EST) Date: Fri, 9 Jun 2006 14:13:13 +1000 From: Nick Withers To: Roger Merritt Message-Id: <20060609141313.cf5129b6.nick@nickwithers.com> In-Reply-To: <5.2.0.9.0.20060607172108.032e7db8@127.0.0.1> References: <20060607183003.23ae3f8c.nick@nickwithers.com> <5.2.0.9.0.20060607120734.00a80700@127.0.0.1> <5.2.0.9.0.20060607151302.00b25118@127.0.0.1> <20060607183003.23ae3f8c.nick@nickwithers.com> <5.2.0.9.0.20060607172108.032e7db8@127.0.0.1> Organization: nickwithers.com X-Mailer: Sylpheed version 2.2.5 (GTK+ 2.8.18; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-nickwithers-MailScanner: Found to be clean X-nickwithers-MailScanner-From: nick@nickwithers.com Cc: ryallsd@gmail.com, freebsd-questions@FreeBSD.ORG Subject: Re: natd not starting on boot-up X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jun 2006 04:13:30 -0000 On Wed, 07 Jun 2006 18:01:43 +0700 Roger Merritt wrote: > At 02:12 AM 6/7/2006 -0700, you wrote: > >On 6/7/06, Nick Withers wrote: > >>On Wed, 07 Jun 2006 15:23:18 +0700 > >>Roger Merritt wrote: > >> > >> > At 04:35 PM 6/7/2006 +1000, you wrote: > >> > >On Wed, 07 Jun 2006 12:13:29 +0700 > >> > >Roger Merritt wrote: > >> > > > >> > > > I'm thoroughly puzzled. Over the weekend I transferred my FreeBSD > >> > > system to > >> > > > a new hard drive. Through laziness I didn't follow the > >> instructions and > >> > > had > >> > > > to make a completely new install. Everything now seems to be > >> working the > >> > > > way it should, Apache, MySQL, PHP, syslog, Samba -- except natd. > >> > > Everything > >> > > > starts on boot-up as it should -- except natd. I can start it manually > >> > > from > >> > > > the command line after booting up and logging in and it works > >> fine, but I > >> > > > can't tell what's going on that it's failing to start. > >> > > > > >> > > > My /etc/rc.conf contains the following: > >> > > > > >> > > > # This file now contains just the overrides from > >> /etc/defaults/rc.conf. > >> > > > defaultrouter="203.151.134.1" > >> > > > gateway_enable="YES" > >> > > > hostname="poppy.international.stjohn.ac.th" > >> > > > ifconfig_ed0="inet 10.3.16.125 netmask 255.255.255.0" > >> > > > ifconfig_ed1="inet 203.151.134.104 netmask 255.255.255.0" > >> > > > router_enable="YES" > >> > > > firewall_enable="YES" > >> > > > firewall_type="OPEN" > >> > > > firewall_quiet="YES" > >> > > > natd_enable="YES" > >> > > > natd_interface="ed1" > >> > > > ipv6_enable="YES" > >> > > > linux_enable="YES" > >> > > > moused_enable="YES" > >> > > > moused_port="/dev/sysmouse" > >> > > > moused_type="auto" > >> > > > screen="daemon" > >> > > > nfs_client_enable="YES" > >> > > > sshd_enable="YES" > >> > > > >> > >That looks alright to me... > >> > > > >> > > > What can I do to get some indication of where the problem is? > >> > > > >> > >Are there any error messages relating to IPFW / natd on boot? > >> > > >> > No, or at least none I could see. That's why I've asked for help. > >> > > >> > >What version of FreeBSD are you running? > >> > > >> > 6.1-STABLE > >> > >>Perhaps there's something wrong in the branch at present...? > >>Doubtful, I guess. > >> > >> > >What's the command > >> > >you're running that _does_ launch natd successfully? > >> > > >> > "/sbin/natd -n ed1". I hadn't thought about "/etc/rc.d/natd start" until > >> > someone suggested it, but that works too and reads the interface from > >> > /etc/rc.conf. > >> > > >> > > What's the > >> > >output of "ls -l /etc/rc.d/natd"? > >> > > >> > [poppy] ~# ls -l /etc/rc.d/natd > >> > -r-xr-xr-x 1 root wheel 978 May 31 09:52 /etc/rc.d/natd > >> > >>Hmmm... Well that all seems OK, then. > >> > >>The only other thing I can think of is that the > >>'router_enable'="YES"' line's creating dramas. > >> > >>As I understand it, this'll cause /etc/rc.d/routed to attempt to > >>launch the routing daemon specified by a 'router="..."' line, > >>which you don't appear to have. I don't think this'd interfere > >>with natd anyway, but I don't really understand what the hell's > >>going on in /etc/rc.d/routed. > >> > >>Sorry I can't be more helpful! > >>-- > > > >I don't run route(daemon) so I don't know about router_enable, but > >here is what I have in my rc.conf to get natd working: > > > >#router stuff > >natd_program="/sbin/natd" > >natd_enable="YES" > >natd_interface="rl0" > >natd_flags="-dynamic -f /etc/natd.conf" > >gateway_enable="YES" > > > >So I use gateway_enable not router_enable. > > > >I don't know if this applies to your problem completely, but might be > >worth a shot. > > Well, I tried commenting it out and restarting. Everything seems to work > without it, but natd still didn't start. > > I can't remember exactly why I decided it should be in there (I also have > 'gateway_enable="YES"'), but it must have been something I read when I > first started using FreeBSD back eight or ten years ago. Well, I'll leave > it commented out for a while and see if other problems show up. I've been doing a little hunting around to figure out how /etc/rc.d/natd's called in the first place and it seems this is done by the /etc/rc.d/ipfw script, which in turn is run when "firewall_enable" is set in /etc/rc.conf. /etc/rc.d/natd's not run directly by /etc/rc due to its having the "nostart" KEYWORD. Is IPFW definitely launched correctly on the system? Otherwise, perhaps it's worthwhile chucking a debug echo or two about the place (for instance, in /etc/rc.d/natd and / or /etc/rc.d/ipfw) and rebooting. Something like this should do the trick, I believe: "echo && echo && echo && echo '/etc/rc.d/natd' && echo && echo && echo" (without the outer quotes). > -- > Roger > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- Nick Withers email: nick@nickwithers.com Web: http://www.nickwithers.com Mobile: +61 414 397 446