From owner-freebsd-questions@FreeBSD.ORG Tue Jun 1 04:11:19 2004 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 F34FD16A4CE for ; Tue, 1 Jun 2004 04:11:18 -0700 (PDT) Received: from ns.komet.ru (ns.komet.ru [80.253.0.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AD5843D1F for ; Tue, 1 Jun 2004 04:11:18 -0700 (PDT) (envelope-from igor@chorus.ru) Received: from mail.chorus.ru ([80.253.13.66]) by ns.komet.ru (8.12.11/8.12.11) with ESMTP id i51BBKVJ028645 for ; Tue, 1 Jun 2004 15:11:20 +0400 (MSD) (envelope-from igor@chorus.ru) Received: from localhost (localhost.office.local [127.0.0.1]) by mail.chorus.ru (Postfix) with ESMTP id 239A18A111 for ; Tue, 1 Jun 2004 14:55:32 +0400 (MSD) Received: from mail.chorus.ru ([127.0.0.1]) by localhost (unix.office.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 54553-04; Tue, 1 Jun 2004 14:55:24 +0400 (MSD) Received: from Igor (igor.office.local [192.168.0.16]) by mail.chorus.ru (Postfix) with ESMTP id 65E9488C90 for ; Tue, 1 Jun 2004 14:55:24 +0400 (MSD) From: "Igor Dombrovan" To: Date: Tue, 1 Jun 2004 15:06:21 +0400 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Thread-Index: AcRHyHimn2qoQoT2R+aW8TT3t1KlLA== Message-Id: <20040601105524.65E9488C90@mail.chorus.ru> X-Virus-Scanned: by amavisd-new at chorus.ru Subject: Policy-based transparent proxying 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: Tue, 01 Jun 2004 11:11:19 -0000 Hi guys Suppose my FreeBSD machine is a router/firewall for a small private network and I use transparent proxying. ipnat.conf looks like this : rdr fxp0 192.168.0.254/32 port 80 -> 192.168.0.254 port 8000 tcp rdr fxp0 0/0 port 80 -> 192.168.0.254 port 3128 tcp map dc0 192.168.0.0/24 -> x.x.x.x/32 proxy port ftp ftp/tcp map dc0 192.168.0.0/24 -> x.x.x.x/32 portmap tcp/udp auto map dc0 192.168.0.0/24 -> x.x.x.x/32 fxp0 being the internal iface and dc0 the external one Now suppose I shall have one more subnet - 192.168.1.0/24 and I want to nat it to another external IP address and make it use a different proxy. With nat it's rather clear but as to using a separate proxy - man 5 ipnat and practice says I can't use "from" clause in rdr. Any ideas (except switching to ipfw) ? Thanks all for your attention Igor