From owner-freebsd-questions@FreeBSD.ORG Fri May 23 01:29:52 2003 Return-Path: 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 94D2537B401 for ; Fri, 23 May 2003 01:29:52 -0700 (PDT) Received: from supermail.mweb.co.za (supermail.mweb.co.za [196.2.53.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id E639743F85 for ; Fri, 23 May 2003 01:29:50 -0700 (PDT) (envelope-from vikashb@mweb.co.za) Received: from [196.2.53.154] (helo=Debug) by supermail.mweb.co.za with smtp (Exim 3.22 #1) id 19J7mR-0001iG-00 for freebsd-questions@freebsd.org; Fri, 23 May 2003 10:19:59 +0200 To: freebsd-questions@freebsd.org From: vikashb@mweb.co.za Date: Fri, 23 May 2003 08:29:47 GMT X-Posting-IP: 196.29.130.251 X-Mailer: Endymion MailMan Standard Edition v3.2.18 Message-Id: Subject: NAT on two interfaces (SOLVED) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 08:29:52 -0000 My orignal question was : ==>Can i set up nat (or ipnat) to do nating on two interfaces ==>in the following manner and how : ==> ==>172.16.1.0/24 connects to 172.16.1.1 which should get redirected to ==>10.10.131.57 and have a source address of 10.10.10.6 I was able to solve this problem using ipnat and ipfilter. config as follows: =========== /etc/ipnat.rules =========== map xl0 10.10.0.0/16 -> 172.16.1.1/32 portmap tcp/udp auto map xl0 10.10.0.0/16 -> 172.16.1.1/32 map fxp0 from 172.16.1.0/24 to 10.10.131.57 port = 22 -> 10.10.10.6/32 rdr xl0 0.0.0.0/0 port 22 -> 198.54.253.209 port 22 ============ END ================ Vikash --------------------------------------------- This message was sent using M-Web Airmail - JUST LIKE THAT M-Web: S.A.'s most trusted and reliable Internet Service Provider. http://airmail.mweb.co.za/