From owner-freebsd-questions Thu Jun 1 23:42:43 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail.rdc1.sdca.home.com (ha1.rdc1.sdca.home.com [24.0.3.66]) by hub.freebsd.org (Postfix) with ESMTP id CCE9037B5E7 for ; Thu, 1 Jun 2000 23:42:40 -0700 (PDT) (envelope-from RaymundoVega@home.com) Received: from home.com ([24.5.252.61]) by mail.rdc1.sdca.home.com (InterMail vM.4.01.02.00 201-229-116) with ESMTP id <20000602064240.KPSH28251.mail.rdc1.sdca.home.com@home.com>; Thu, 1 Jun 2000 23:42:40 -0700 Message-ID: <3937575F.6F92CFC6@home.com> Date: Thu, 01 Jun 2000 23:42:39 -0700 From: "Raymundo M. Vega" X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 3.2-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Jake Ott Cc: freebsd-questions@FreeBSD.ORG Subject: Re: NAT/gated over 2 netcards References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jake Ott wrote: > > I'm attempting something I thought to be fairly simple. 2 net cards, 1 > outside ethernet, 1 internal (10.x.x.x) net. IS this to much to ask? > > I know some sort of ip masquarading (sp) is needed here, but i really have > no diea where to start. Any help would be appreaciated. you will have to run natd, in order to do this, you have to build a custom kernel with: options IPFIREWALL options IPDIVERT make sure you have enabled your computer as gateway (in /etc/defaults/rc.conf) make sure that in /etc/services there is a line like: natd 8668/divert edit /etc/rc.firewall or if you are not interested in a firewall, change the name of the file and create a new one with /sbin/ipfw -f flush /sbin/ipfw add divert natd all from any to any via ed0 /sbin/ipfw add pass all from any to any here i suppose ed0 is the "outer" nic, change if this is not true if you use bourne shell and you are using the small rc.firewall: sh /etc/rc.firewall now run natd: /usr/sbin/natd -n ed0 again i assume ed0 is the outer nic \ good luck raymundo > > -Jake > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message