From owner-freebsd-questions@FreeBSD.ORG Tue Jan 24 16:42:36 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 3EFE616A41F for ; Tue, 24 Jan 2006 16:42:36 +0000 (GMT) (envelope-from hagemann1@egs.uct.ac.za) Received: from janeway.egs.uct.ac.za (janeway.egs.uct.ac.za [196.21.8.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4ED6843D6E for ; Tue, 24 Jan 2006 16:42:33 +0000 (GMT) (envelope-from hagemann1@egs.uct.ac.za) Received: from [196.21.8.146] (helo=particle.egs.uct.ac.za) by janeway.egs.uct.ac.za with esmtp (Exim 3.36 #4) id 1F1RFk-0000GU-00 for freebsd-questions@freebsd.org; Tue, 24 Jan 2006 18:42:44 +0200 From: Kilian Hagemann Organization: University of Cape Town To: freebsd-questions@freebsd.org Date: Tue, 24 Jan 2006 18:42:08 +0200 User-Agent: KMail/1.8.1 References: <43D6539E.1090900@o2.pl> In-Reply-To: <43D6539E.1090900@o2.pl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601241842.08563.hagemann1@egs.uct.ac.za> Subject: Re: Sharing internet connection, how? 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: Tue, 24 Jan 2006 16:42:36 -0000 On Tuesday 24 January 2006 18:19, cblasius pondered: > Hello! > > I have two ethernet cards on my computer. The first is rl0 - with > the adrress from my ISP xxx.xxx.xxx.xxx (DSL 1M), and the second is vr0 > - with the address 192.168.1.1. > > I want to use my computer as gateway to internet for the other > computers in my home. How I can sharing internet connection on my > computer to the rest computers in my home? I hve 2 computers (my and my > wife (rl0 192.168.1.2)). > > Could somone help me, I'm beginner? > > I have the following rc.conf file: > > defaultrouter="vvv.vvv.vvv.vvv" > gateway_enable="YES" > natd_enable="YES" > hostname="myhost" > ifconfig_rl0="inet xxx.xxx.xxx.xxx netmask 255.255.255.0" > ifconfig_vr0="inet 192.168.1.1 netmask 255.255.255.0" > linux_enable="YES" > moused_enable="YES" > moused_flags="-3" > sshd_enable="YES" > usbd_enable="YES" > > What I must to do else, because my wife could not connect to the > internet? > FreeBSD 6.0-RELEASE Until recently I managed a very similar setup. I think all you need is natd_interface=rl0 natd_flags="-log_ipfw_denied -log_denied" The latter is just so that you can see spurious connection attempts in /var/log/security. Check man natd for more info. Also, you'll have to either statically configure your wife's PC to use 192.168.1.2 (or whatever), default gateway/route 192.168.1.1 and proper DNS. Alternatively install and configure dhcpd, or, which I like more for a simple application like that, dnsmasq. Google will tell you more :-) -- Kilian Hagemann Climate Systems Analysis Group University of Cape Town Republic of South Africa Tel(w): ++27 21 650 2748