From owner-freebsd-ports Mon Sep 2 1:50: 9 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2906537B400 for ; Mon, 2 Sep 2002 01:50:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84AF943E75 for ; Mon, 2 Sep 2002 01:50:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g828o2JU084732 for ; Mon, 2 Sep 2002 01:50:02 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g828o2Ad084731; Mon, 2 Sep 2002 01:50:02 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DEE137B400 for ; Mon, 2 Sep 2002 01:49:50 -0700 (PDT) Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id C52CC43E7B for ; Mon, 2 Sep 2002 01:49:49 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g828nnOT089206 for ; Mon, 2 Sep 2002 01:49:49 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.4/8.12.4/Submit) id g828nnMZ089205; Mon, 2 Sep 2002 01:49:49 -0700 (PDT) Message-Id: <200209020849.g828nnMZ089205@www.freebsd.org> Date: Mon, 2 Sep 2002 01:49:49 -0700 (PDT) From: Mark Weisman To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: ports/42318: NATD redirect limitations Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 42318 >Category: ports >Synopsis: NATD redirect limitations >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 02 01:50:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Mark Weisman >Release: 4.5 stable >Organization: Outland Domian Group >Environment: FreeBSD mickey infinitevisions.ws 4.5-RELEASE #1; Sat May 4 21:29:01 AKDT 2002 root@mickey.infinitevisions.ws:/usr/src/sys/compile/MICKEY i386 >Description: Is there a way to redirect a singular incoming port to two internal IP Addresses using NATD? I want to say the www.domain1.com and www.domain3.com go to an internal address of 192.168.1.2 using redirect_port tcp 192.168.1.2:http 80 however, I'd also like to say if I get requests for www.domain2.com that they be routed to an internal IP address of 192.168.1.3 using a second redirect line in my rc.conf file: redirect_port tcp 192.168.1.3:http 80 then have each instance of Apache webserver appropriately direct the traffic to the right folder. Is there a way to do this? >How-To-Repeat: Build a standard IPFW firewall, with NATD services installed, and try to redirect a port to multiple internal addresses. >Fix: Potentially use Perl scripting in my config file for rc.conf, able to stipulate the name request then direct accordingly? my (reqname); reqname = {remote name requested}; if {reqname eq "www.domain2.com"} { document.url=("192.168.1.3"); elsif {reqname ne "www.domain2.com"){ document.url=("192.168.1.2"); }; Something like that anyways. } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message