From owner-freebsd-current@FreeBSD.ORG Fri Oct 13 15:05:26 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03A6216A415 for ; Fri, 13 Oct 2006 15:05:26 +0000 (UTC) (envelope-from dom@helenmarks.co.uk) Received: from mailhost.graphdata.co.uk (mailhost.graphdata.co.uk [195.12.22.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82E5143D6B for ; Fri, 13 Oct 2006 15:05:25 +0000 (GMT) (envelope-from dom@helenmarks.co.uk) Received: from localhost (localhost [127.0.0.1]) by mailhost.graphdata.co.uk (Postfix) with ESMTP id 17D98114031 for ; Fri, 13 Oct 2006 16:05:22 +0100 (BST) X-Virus-Scanned: amavisd-new at graphdata.co.uk Received: from mailhost.graphdata.co.uk ([127.0.0.1]) by localhost (mailhost.graphdata.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vWkbLb8Aj6f6 for ; Fri, 13 Oct 2006 16:05:17 +0100 (BST) Received: from gdc083.internal.graphdata.co.uk (gdc083.internal.graphdata.co.uk [192.168.0.86]) by mailhost.graphdata.co.uk (Postfix) with SMTP id D902211402E for ; Fri, 13 Oct 2006 16:05:17 +0100 (BST) Date: Fri, 13 Oct 2006 16:05:17 +0100 From: Dominic Marks To: freebsd-current@freebsd.org Message-Id: <20061013160517.6c85ea12.dom@helenmarks.co.uk> In-Reply-To: References: X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.8.20; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Please help to forward port 80 to 8800 with ipfw X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Oct 2006 15:05:26 -0000 On Fri, 13 Oct 2006 10:46:01 -0400 "fulan Peng" wrote: > Hi, > I am using Apache on FreeBSD. If I use port 80 for http port, it won't > work because the security problem. So I configured Apache to listen > port 8800. Now the customer has type http://breakevilaxis.org:8800 to > get on my web site. This is no good. So I have to forward port 80 > request to port 8800. I guess what I should do is to ipfw add 100 fwd > 127.0.0.0,80 tcp from any to any 8800 in > But I got an error when I execute the command. > I have compiled the kernel with LINT configuration. > I did make LINT, make cleandepend;make depend;make;make install > I really do not what is the kernel I am running. I doubt it is still > the old kernel which the IPFIREWALL_FORWARD is not selected. > Please help me to achieve this. > You could achieve this with pen, a tool in the ports collection. It is very quick to setup and doesn't require you configure a firewall or build/install a new kernel. # pkg_add -rv pen Or # cd /usr/ports/net/pen && make install Add these lines to /etc/rc.conf: pen_enable="YES" pen_flags="-p /var/run/pen.pid 80 127.0.0.1:8880" Then start pen: # /usr/local/etc/rc.d/pen start It will start on boot up with the rest of your system. ** The pen script might be called pen.sh on your system. -- Dominic