BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old October 15th, 2004, 01:08 PM
murphy_young murphy_young is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 296 murphy_young User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 17 m 54 sec
Reputation Power: 0
port forward with 5.2.1

I have setup my box using ipfilter+ipnat and pppoe

my /etc/rc.conf :

ipfilter_enable="YES"
ipnat_enable="YES"
#
ppp_enable="YES"
ppp_mode="ddial"
ppp_profile="myisp"
#

my /etc/ipnat.rules :

map tun0 0/0 -> 0/32 proxy port ftp ftp/tcp
map tun0 0/0 -> 0/32 portmap tcp/udp auto
map tun0 0/0 -> 0/32



my /etc/ipf.rules :

# block short packets
block in quick all with short

# block packets with IP options
block in quick all with ipopts

# loopback
pass in quick on lo0 all
pass out quick on lo0 all


#---------------------------------------------------------------------------
# group head 100/150 - LAN interface
#---------------------------------------------------------------------------
block in quick on xl0 all head 100
block out quick on xl0 all head 150

#---------------------------------------------------------------------------
# group head 200/250 - WAN interface
#---------------------------------------------------------------------------
block in log quick on tun0 all head 200
block out quick on tun0 all head 250

#---------------------------------------------------------------------------
# incoming traffic on LAN interface - group 100
#---------------------------------------------------------------------------
pass in quick proto tcp from 192.168.0.0/24 to any flags S/SAFR keep state group 100
pass in quick proto udp from 192.168.0.0/24 to any keep state group 100
pass in quick proto icmp from 192.168.0.0/24 to any keep state group 100
pass in quick proto esp from 192.168.0.0/24 to any keep state keep frags group 100
pass in quick proto gre from 192.168.0.0/24 to any keep state group 100

#---------------------------------------------------------------------------
# outgoing traffic on LAN interface - group 150
#---------------------------------------------------------------------------
pass out quick proto icmp from 192.168.0.50 to 192.168.0.0/24 keep state group 150

#---------------------------------------------------------------------------
# incoming traffic on WAN interface - group 200
#---------------------------------------------------------------------------
# block anything from private networks
block in quick from 10.0.0.0/8 to any group 200
block in quick from 127.0.0.0/8 to any group 200
block in quick from 172.16.0.0/12 to any group 200
block in quick from 192.168.0.0/16 to any group 200


# pass rules for mapped ports (to DMZ or LAN) go here

#---------------------------------------------------------------------------
# outgoing traffic on WAN interface - group 250
#---------------------------------------------------------------------------
pass out quick proto tcp from any to any keep state group 250
pass out quick proto udp from any to any keep state group 250
pass out quick proto icmp from any to any keep state group 250

#---------------------------------------------------------------------------
# default rules (just to be sure)
#---------------------------------------------------------------------------
block in quick all
block out quick all

Now, the internet is working great, the NAT is working great,
my problem is that I can't make port forward.
The howto that I use for the ipfilter+ipnat and pppoe didn't
explain how to do port forward.
I have a host in my lan 192.168.0.100 that have a runing
web server and I want that all the trafic from the internet
that is coming to port 80 will go to 192.168.0.100 port 80

Anybody can tell me what I have to add to
my /etc/ipnat.rules and /etc/ipf.rules ?

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > port forward with 5.2.1


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway