strange problem with ipfw

vladone vladone at spaingsm.com
Mon Aug 8 09:48:41 GMT 2005


Hi!
I have an freebsd (5.4) server that act as gateway. NAT is done with ipnat
and traffic shaping with ipfw+dummynet.
I have this problem: server work whell, but after aproximatively 5
min. my private interface stop responding (i dont have
ping, nothing).
After i give "ipfw flush" and reload ipfw script, my server work
again.
Where is my problem?

My ipfw script is:

#!/bin/sh
cmd="/sbin/ipfw -q"
pif="rl0"
lif="fxp0"
local_net="192.168.101.0/24"
down="250Kbit/s"
up="200Kbit/s"
games_ports="27005,27010,27015,27016,27017,27018,27019,27020"

#flush rules
$cmd flush

$cmd add 50 allow ip from $local_net to $local_net via $lif

$cmd add 200 deny ip from any to any 80 in via $lif
$cmd add 200 skipto 300 ip from $local_net to any in via $lif
$cmd add 200 skipto 300 ip from any to $local_net out via $lif
$cmd add 200 deny ip from any to any via $lif

$cmd pipe 1 config bw $down
$cmd pipe 2 config bw 128kbits/s mask dst-ip 0xffffff
$cmd queue 1 config pipe 1 weight 1 mask dst-ip 0xffffff

$cmd add 500 pipe 2 ip from any $games_ports to any out via $lif
$cmd add 500 skipto 600 ip from any $games_ports to any out via $lif

$cmd add 500 queue 1 ip from any to any out via $lif

$pif is public interface and $lif is private interface

and my sysctl.conf contain:
 net.inet.ip.fw.one_pass=0

For moment i resolv this running ipfw script every at 3 min. with
crontab but this is not normal solution.




More information about the freebsd-ipfw mailing list