Re: Please help to forward port 80 to 8800 with ipfw

From: Dominic Marks <dom_at_helenmarks.co.uk>
Date: Fri, 13 Oct 2006 16:05:17 +0100
On Fri, 13 Oct 2006 10:46:01 -0400
"fulan Peng" <fulanpeng_at_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
Received on Fri Oct 13 2006 - 13:05:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:01 UTC