Date: Fri, 30 Nov 2007 15:33:37 +0100 From: usleepless@gmail.com To: "Lucas Neves Martins" <snowniak@gmail.com> Cc: questions@freebsd.org Subject: Re: Firewall Redirect Message-ID: <c39ec84c0711300633i50a61694i4887685b268d4d63@mail.gmail.com> In-Reply-To: <49eaeb190711300559u34557d6bha38a72d84a65caca@mail.gmail.com> References: <49eaeb190711300559u34557d6bha38a72d84a65caca@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/30/07, Lucas Neves Martins <snowniak@gmail.com> wrote: > Hello guys, > > I=B4m having the following problem: > > Redirect requests from the port 80, to the port 8082. - for apache tomcat= . > > I=B4m new on freeBSD, Of course, I had looked out on google, and read the > firewall section on the Handbook. > > But only found missed things, and nothing worked. > > I have tried this commands: > > #history | grep divert > > H > > > > 422 ipfw add 950 divert 8082 tcp from any to any 80 via em0 > 425 ipfw add 950 divert 8082 tcp from any to any 80 via em0 > 428 ipfw add 950 divert 80 tcp from any to any 8082 via em0 > 432 ipfw add 950 divert 8082 tcp from any to any 80 via em0 > 435 ipfw add 950 divert 8082 tcp from any to any 80 via em0 > > > > I know how works the number 950, I know it is on the right position, but = I > dont know how works the divert, > > and even what it is. I dont know if "divert 8082" makes the requests come > from 80, or go to 80. > > damn... > > Any help will be useful. AFAIK, divert in ipfw diverts to unix-domain sockets. i think you might pull it off with ipnat + /etc/ipnat.conf: rdr em0 0.0.0.0/0 port 80 -> 0.0.0.0/0 port 8082 regards, usleep
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c39ec84c0711300633i50a61694i4887685b268d4d63>