From owner-freebsd-net@FreeBSD.ORG Sat Oct 25 12:04:44 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 52F2E16A4B3 for ; Sat, 25 Oct 2003 12:04:44 -0700 (PDT) Received: from imhotep.yuckfou.org (cust.89.117.adsl.cistron.nl [195.64.89.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C4DC43FD7 for ; Sat, 25 Oct 2003 12:04:42 -0700 (PDT) (envelope-from nivo+sender+8eb026@yuckfou.org) Received: from localhost (localhost [127.0.0.1]) by imhotep.yuckfou.org (Postfix) with ESMTP id 5A431A4 for ; Sat, 25 Oct 2003 21:05:56 +0200 (CEST) Received: from imhotep.yuckfou.org ([127.0.0.1]) by localhost (imhotep.yuckfou.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19952-09 for ; Sat, 25 Oct 2003 21:05:55 +0200 (CEST) Received: from localhost.yuckfou.org (localhost [IPv6:::1]) by imhotep.yuckfou.org (Postfix) with ESMTP id ABD918E for ; Sat, 25 Oct 2003 21:05:55 +0200 (CEST) Received: from yuckfou.org (turbata-xp [192.168.2.236]) by localhost.yuckfou.org (tmda-ofmipd) with ESMTP; Sat, 25 Oct 2003 21:05:42 +0200 (CEST) Message-ID: <3F9AC937.4070200@yuckfou.org> Date: Sat, 25 Oct 2003 21:04:23 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030912 Thunderbird/0.3a X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit From: Nils Vogels X-Delivery-Agent: TMDA/0.86 (Venetian Way) X-TMDA-Fingerprint: KKcf9hvUpVnbiraobHG26gRrC7M X-Virus-Scanned: by amavisd-new at yuckfou.org Subject: Reverse IP NAT to secondary IP address X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Nils Vogels List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2003 19:04:44 -0000 Hi there! I'm trying to solve a situation that I have with a device which needs SNMP polling, but is not normally reachable to the outside world, because it cannot install a default gateway. In short, a situation scetch: SNMP-server (192.168.2.2/24) ----------- +------------+ +-------------+ | | WWW |--------------------| Gateway | --------------+ +------------+ +-------------+ | 192.168.0.2/24 192.168.0.1 IP: 195.x.x.x.x \-----> Internet (0.0.0.0/0) (rl0) Alias: 192.168.2.1 (ed0) Now what I am trying to do is get statistics from the SNMP-server into the WWW box, but I am stuck on the following: WWW is a FreeBSD-4.8 box. Gateway is a FreeBSD-4.8 box with IP Filter Since the SNMP-server does not have a default route, the traffic needs to originate from an IP address within the same subnet as the Gateway. To that end, I have added an alias IP of 192.168.2.1 to the gateway. When I run an snmpwalk from the gateway all goes fine. Since the traffic is coming from WWW and heading through the Gateway, which does not bridge, I have to perform some form of NATting in the gateway. I've been searching and attempting various redirects and map entries, and am now stuck at: map rl0 from 192.168.0.0/24 to 192.168.2.0/24 port = 161 -> 192.168.2.1/32 I think I'm close .. can someone give me the final hint ? ;-) Thanks, Nils.