Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Apr 2005 12:28:25 +0000
From:      Angelin Lalev <lalev@sv-bg.com>
To:        freebsd-questions@freebsd.org
Subject:   ipfilter problems
Message-ID:  <424E8FE9.1090904@sv-bg.com>

next in thread | raw e-mail | index | archive | help
Two days ago I've switched the firewall on my FreeBSD 5.3 RELEASE
router from ipfw to ipfilter.  The  firewalls are not my speciality
and ipfilter looked simplier way to do NAT with firewall, because
it separates NAT rules from filtering rules.

The router has two interfaces rl0 (192.168.0.254/24) and rl1 
(82.137.64.106/29, 192.168.5.1/24, 10.1.6.2/24).
The ipfilter is compiled in kernel:
======================
options IPFILTER
options IPFILTER_LOG
options IPFILTER_DEFAULT_BLOCK

/etc/ipnat.conf
============
map rl1 192.168.0.1/27 -> 82.137.64.106/32

/etc/ipf.rules
============
pass in quick on lo0
pass out quick on lo0
pass out quick on rl0 all
pass in quick on rl0 all
pass in quick on rl1 proto tcp from 192.168.5.1/24 to 192.168.5.1 port = 
80 flags S keep state
pass in quick on rl1 proto tcp from 192.168.5.1/24 to 192.168.5.1 port = 
3128 flags S keep state
# local counter-strike server. No NAT.
pass in quick on rl1 from 192.168.5.1/24 to 192.168.0.50 keep state
block in quick on rl1 from 192.168.5.1/24 to any
pass out quick on rl1 all keep state

The problem
========
On 192.168.0.0/24 network I have 6 machines. The router itself is an old
166 MHz Pentium box, but load averages are not bigger than 10%. When one 
of the machins makes dns lookup (the dns server is on outside - 
62.73.78.2) it fails with timeout in about 9 of 10 times.
ipfstat -t shows that a rule is created - something like this:
Source IP                  Dest IP                ST   PR    
pkts.        bytes 
192.168.0.4,1029      62.73.78.2,53      0/0  udp  165           9992  

Any help will be appreciated.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?424E8FE9.1090904>