From owner-freebsd-questions Tue Oct 5 20:27:55 1999 Delivered-To: freebsd-questions@freebsd.org Received: from ns1.portal2.com (ns1.portal2.com [203.85.226.193]) by hub.freebsd.org (Postfix) with SMTP id 87139150E1 for ; Tue, 5 Oct 1999 20:27:48 -0700 (PDT) (envelope-from yusufg@outblaze.com) Received: (qmail 52369 invoked from network); 6 Oct 1999 03:26:39 -0000 Received: from yusufg.portal2.com (qmailr@203.85.226.249) by ns1.portal2.com with SMTP; 6 Oct 1999 03:26:39 -0000 Received: (qmail 3567 invoked by uid 500); 6 Oct 1999 03:27:44 -0000 Date: Wed, 6 Oct 1999 11:27:44 +0800 From: Yusuf Goolamabbas To: Chris Dillon Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Trying to achieve zen with natd Message-ID: <19991006112744.A3111@outblaze.com> References: <19991005045350.11294.qmail@yusufg.portal2.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3i In-Reply-To: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > That doesn't really make any sense... Is fxp1 attached to your > private network, or the public network? Both, some machines on that network have valid routable address and some machines have non routable addresses. Therefore I have aliased a 192.168 on this interface What I would like is packets coming via this aliased interface get NAT'ted to the public interface which is also bound to the same card This card is connected to a switch which connects via a router to the WAN interface This machine also has a second NIC which connects to a different switch and then on via a router to a different WAN interface The current function of this box is to act as router to get to/fro from machines in the different ISP segments without the packets leaving the premises and going through the IX. This works very well. Now, I would also like it to be a NAT box From what I read of NAT, it usually requires 2 NIC's, one to the internal (192.168) network and the other NIC to the external one. What I need to do is to make this work with one NIC bound to 2 different IP addresses. Is this possible ? > > > I would like to configure this box to act as a NATD box. Set the right > > kernel config and recompile the kernel > > > > /etc/rc.conf > > > > gateway_enable="YES" > > firewall_enable="YES" > > firewall_type="open" > > natd_enable = "YES" > > natd_interface = "fxp1" #Assuming this will take the public interface > > natd_flags = "-u" > > The natd_interface does indeed take the public interface, but that > isn't what you seem to be indicating below.... > > > I did the following in /etc/rc.local > > > > ifconfig fxp1 alias 192.168.0.1 netmask 255.255.255.0 > > You don't need to, and probably shouldn't, do this in /etc/rc.local. > Add a line like this to /etc/rc.conf: > > ifconfig_fxp1_alias0="inet 192.168.0.1 netmask 255.255.255.0" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message