|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 ? |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > port forward with 5.2.1 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|