From owner-freebsd-questions Sun Dec 8 11:20:56 2002 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 751EA37B401 for ; Sun, 8 Dec 2002 11:20:54 -0800 (PST) Received: from sage-one.net (adsl-65-71-135-137.dsl.crchtx.swbell.net [65.71.135.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29E3D43EBE for ; Sun, 8 Dec 2002 11:20:53 -0800 (PST) (envelope-from jackstone@sage-one.net) Received: from sagea (sagea [192.168.0.3]) by sage-one.net (8.11.6/8.11.6) with SMTP id gB8JKhd71854; Sun, 8 Dec 2002 13:20:47 -0600 (CST) (envelope-from jackstone@sage-one.net) Message-Id: <3.0.5.32.20021208132041.01194730@mail.sage-one.net> X-Sender: jackstone@mail.sage-one.net X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Sun, 08 Dec 2002 13:20:41 -0600 To: "bowen" , From: "Jack L. Stone" Subject: Re: rc.firewall/ipfw/nat In-Reply-To: <018801c29ee6$302e42c0$020aa8c0@morpheous> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 11:18 AM 12.8.2002 -0700, bowen wrote: >Hi all need a little help ,) > >what I currently have >internet --- cable modem(via DHCP) ---[ed0 Smoothwall0.9.9se ed1] --- >10/100Switch --- int network > >what I want to have >internet --- cable modem --- [ "dc0"{FreeBSD4.7-RELEASE}"dc1"]----- >10/100Switch ---- internal network > ># set these to your outside interface network and netmask and ip >oif="dc0" >onet="?.?.?.?" <----- DHCP -- how do I set this value? >omask="???.???.???.?" DHCP again >oip="??.??.??" DHCP > ># set these to your inside interface network and netmask and ip >iif="dc1" >inet="192.168.10.0/24" >imask="255.255.255.0" >iip="192.168.10.1/24" > >then in the services >natd 6668/divert >or is it >natd 8868/divert >or does it matter? > >I've been trying to do this both with ipfilter and ipfirewall via various >how to's found googling and the book The Complete BSD 3rd Edition but I just >can't seem to get it to work.. any help would be greatly appreciated > >Thanks to all of you > >Rick > Well, here is a little help as you request: On your outside interface, since it is dynamic, the IP may change I suppose rather than be static... (never used a cable). These lines will interrogate your actual settings for the dc0 interface each time: # onet=`ifconfig dc0 | awk '/inet / {print $4}'` # omask=`ifconfig dc0 | awk '/netmask / {print $6}'` # oip=`ifconfig dc0 | awk '/inet / {print $2}'` For your inside interface, this will work: # inet="192.168.10.0" # imask="255.255.255.0" (or - "0xffffff00") # iip="192.168.10.1" As for divert, I believe that should be 8668. I think that should do it.... Best regards, Jack L. Stone, Administrator SageOne Net http://www.sage-one.net jackstone@sage-one.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message