Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Aug 2005 12:49:20 +0300
From:      vladone <vladone@spaingsm.com>
To:        freebsd-ipfw@freebsd.org
Subject:   strange problem with ipfw
Message-ID:  <5210286161.20050808124920@spaingsm.com>

Next in thread | Raw E-Mail | Index | Archive | Help
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.





Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?5210286161.20050808124920>