From owner-freebsd-questions@FreeBSD.ORG Fri Sep 26 10:31:07 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E02631065690 for ; Fri, 26 Sep 2008 10:31:07 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id AF8BE8FC20 for ; Fri, 26 Sep 2008 10:31:07 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (mail.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id 8720CAFBC01; Fri, 26 Sep 2008 02:31:06 -0800 (AKDT) From: Mel To: freebsd-questions@freebsd.org Date: Fri, 26 Sep 2008 12:29:10 +0200 User-Agent: KMail/1.9.7 References: <6fcb5b8a45c5f63a10d863a009ee0700@localhost> In-Reply-To: <6fcb5b8a45c5f63a10d863a009ee0700@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809261229.11108.fbsd.questions@rachie.is-a-geek.net> Cc: Colin Brace Subject: Re: gateway NAT settings lost 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, 26 Sep 2008 10:31:08 -0000 On Friday 26 September 2008 11:41:41 Colin Brace wrote: > I recently ran out of diskspace on the root partition of my FreeBSD 7 box, > which serves as a home server/gateway. As a result, when I went to edit my > rc.conf file with nano earlier this moth, it couldn't save the changes and > the file was written zero-length. Alas, my nightly backup subsequently > archived this, and I've now lost the original. This is one reason I use sudoedit for configuration files, even if I'm su'd to root. Also, incremental backups are a good thing. > Here is my rc.conf now: > > check_quotas="NO" > cron_enable="YES" > hostname="venus" > inetd_enable="NO" > linux_enable="YES" > moused_enable="YES" > sshd_enable="YES" > usbd_enable="YES" > lighttpd_enable="YES" > postfix_enable="YES" > sendmail_enable="NO" > sendmail_submit_enable="NO" > sendmail_outbound_enable="NO" > sendmail_msp_queue_enable="NO" > dovecot_enable="YES" > rpcbind_enable="YES" > nfs_server_enable="YES" > mountd_flags="-r" > > # WLAN interface > ifconfig_fxp0="DHCP" > > # LAN interface > ifconfig_rl0="inet 192.168.1.1 netmask 255.255.255.0" > > # WIFI interface > ifconfig_ath0="" > > smartd_enable="YES" > pf_enable="YES" > pflog_enable="YES" > dhcpd_enable="YES" > > /usr/local/sbin/dnrd -s 208.67.222.222 > > postgresql_enable="YES" > obspamd_enable="YES" > obspamdlog_enable="YES" > dovecot_enable="YES" > rsyncd_enable="YES" > rtadvd_enable="YES" > > I am using PF for NAT, and have the following rule: > > [...] > ext_if = "fxp0" > [...] > nat on $ext_if from !($ext_if) to any -> ($ext_if) > [...] > > I must be missing something obvious, but what? gateway_enable="YES" perhaps. Either that or pf is not started, because it cannot resolve a hostname in a table. Setting rc_debug="YES" will show some possibilities. -- Mel Problem with today's modular software: they start with the modules and never get to the software part.