Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Oct 2006 16:05:17 +0100
From:      Dominic Marks <dom@helenmarks.co.uk>
To:        freebsd-current@freebsd.org
Subject:   Re: Please help to forward port 80 to 8800 with ipfw
Message-ID:  <20061013160517.6c85ea12.dom@helenmarks.co.uk>
In-Reply-To: <bf0f1bc90610130746m311e56a0pa1531da9837a56c7@mail.gmail.com>
References:  <bf0f1bc90610130746m311e56a0pa1531da9837a56c7@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 13 Oct 2006 10:46:01 -0400
"fulan Peng" <fulanpeng@gmail.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061013160517.6c85ea12.dom>