From owner-freebsd-newbies@FreeBSD.ORG Wed Jan 19 09:17:56 2005 Return-Path: Delivered-To: freebsd-newbies@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7067B16A52D for ; Wed, 19 Jan 2005 09:17:55 +0000 (GMT) Received: from mail.bredband.st (mail.bredband.st [195.178.186.125]) by mx1.FreeBSD.org (Postfix) with SMTP id 957DF43D55 for ; Wed, 19 Jan 2005 09:17:54 +0000 (GMT) (envelope-from mattias.nordlund@bahnhofbredband.net) Received: from EXCH-03.bredband.bahnhof.se ([192.168.1.2]) by mail.bredband.st (SAVSMTP 3.0.0.44) with SMTP id M2005011910155213366 for ; Wed, 19 Jan 2005 10:15:52 +0100 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Date: Wed, 19 Jan 2005 10:16:57 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Freebsd 5.3-stable natd multiple external ipadress Thread-Index: AcT+B6AsdsiM9HXES42kDbUhAi0anw== From: "Mattias Nordlund" To: Subject: Freebsd 5.3-stable natd multiple external ipadress X-BeenThere: freebsd-newbies@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Gathering place for new users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2005 09:17:56 -0000 Hi, I have a problem . Freebsd 5.3 Stable Natd Ipfw external interface =3D fxp1 internal interface =3D fxp2 I have three external ipadress on fxp1 81.10.5.2 /29 81.10.5.3=20 81.10.5.4=20 On the fxp2 (internal interface) I have : 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 I need to route the packets from my internal net to the correct external ipadress. Something like: iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT --to 81.10.5.2 iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -j SNAT --to 81.10.5.3 iptables -t nat -A POSTROUTING -s 192.168.3.0/24 -j SNAT --to 81.10.5.4 How can I do that with ipfw and nat ? Heeelp=20 Regards, Mattias=20