LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 09-09-2008, 01:59 AM   #1
adilturbo
Member
 
Registered: Jun 2006
Location: morocco
Posts: 195

Rep: Reputation: 30
ipfw & tomcat on port 80


hello,

i am running tomcat from jail using port 8080, as non-root user.
i want to access tomcat through port 80 using ipfw forward feature.
i recompiled the kernel using this options:

Quote:
options IPFIREWALL
options IPFIREWALL_FORWARD
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=15
and set a rule in rule file like this :
Quote:
add 1000 fwd 127.0.0.1,8080 tcp from any to 80 in
when listing the rules (ipfw list) i get this:

Quote:
00100 allow ip from any to any via lo0
00200 deny ip from any to 127.0.0.0/8
00300 deny ip from 127.0.0.0/8 to any
01000 fwd 127.0.0.1,8080 tcp from any to any dst-port 80 in
65535 deny ip from any to any
when i try to access tomcat through port 80, it doesn't work?

am i missing something?

thanks in advance for the help.

Adil
 
Old 09-09-2008, 12:45 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I've worked with IPFW for a couple years, but I haven't used it for forwarding / NAT at all. If you haven't already, read through 28.6 IPFW and the manpages for ipfw(8).

Frankly, for tcp forwarding I prefer to use rinetd (which you can install from ports) because of its simplicity. But I'm probably in the minority there.
 
Old 09-09-2008, 06:44 PM   #3
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
You could just use PF, which is already built-in by default SFAIK. The syntax is dead simple and it gives you a single place to configure port redirection, NAT, and packet filtering.
 
Old 09-11-2008, 09:50 AM   #4
adilturbo
Member
 
Registered: Jun 2006
Location: morocco
Posts: 195

Original Poster
Rep: Reputation: 30
hi there,

thank you so much for the help, i used rinetd, it works.
rinetd is so easy and simple.
i let ipfw as filter.

thanks again
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between Tomcat 1.5&1.6 and Apache 2.1 & 2.2 chnlinux Linux - Newbie 1 12-04-2007 09:44 PM
Tomcat & port 80 MBH Fedora 0 11-18-2006 11:21 PM
Tomcat listen to port 80 thisObject Linux - Software 3 05-09-2006 01:38 AM
sendmail on solaris with no hostname & ipfw (or other firewall) tutorials Maidros Solaris / OpenSolaris 1 07-10-2005 01:34 PM
Port forwarding (moving datacenter) ipfw/iptables/ipportfw RyanT2k Linux - Networking 7 12-04-2002 02:03 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 08:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration