----- Original Message -----
From: "Guido van Rooij" <[EMAIL PROTECTED]>
To: "Derkjan de Haan" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, May 26, 2004 1:24 PM
Subject: Re: ipfilter
> On Tue, May 25, 2004 at 09:20:06AM +0200, Derkjan de Haan wrote:
> > Hi,
> >
> > I recently installed FreeBSD 4.9 on my home firewall/server, and I'm
using
> > the bundled ipfilter as firewall package of choice. However, I came
across
> > a few oddities; maybe someone can shed some light on these ?
> >
> > 1) For active FTP to work, I noticed I have to specify the back-end
> > network, as well as the address of the server itself. I mean this most
> > elegant syntax
> >
> > map em1 0/0 -> 0/32 proxy port ftp ftp/tcp
> >
> > is supposed to work if I understood the FAQ correctly, but is does not.
> > This only works for FTP traffic originating from the firewall itself,
but
> > not for hosts behind it. Instead I have to use this:
> >
> > map em1 <extip>/32 -> 0/32 proxy port ftp ftp/tcp
> > map em1 192.168.2.0/24 -> 0/32 proxy port ftp ftp/tcp
>
> That is weird. I think map em1 0/0 -> 0/32 proxy port ftp ftp/tcp
> should have worked. What do you see with ipnat -lv when you try to ftp
> out?
>
> -Guido
Below is the output with the 0/0 -> 0/32 rule in place, with two active ftp
sessions. The error in the ftp client is 'Illegal PORT command; use PORT or
PASV first'.
List of active MAP/Redirect filters:
map em1 0.0.0.0/0 -> 0.0.0.0/32 proxy port ftp ftp/tcp
rdr em1 0.0.0.0/0 port 6881 -> 192.168.2.1 port 6881 tcp
rdr em1 0.0.0.0/0 port 4662 -> 192.168.2.1 port 4662 tcp
rdr em1 0.0.0.0/0 port 4672 -> 192.168.2.1 port 4672 udp
map em1 192.168.2.0/24 -> 0.0.0.0/32 portmap tcp/udp auto
map em1 192.168.2.0/24 -> 0.0.0.0/32
List of active sessions:
MAP 192.168.2.1 1096 <- -> 82.161.5.123 1364 [194.109.21.66 21]
age 863994 use 0 sumd 0x96e0/0x96e0 pr 6 bkt 95/77 flags 1 drop 0/0
ifp em1 bytes 1871 pkts 26
MAP 192.168.2.1 1094 <- -> 82.161.5.123 1362 [62.93.193.119 21]
age 433 use 0 sumd 0x96e0/0x96e0 pr 6 bkt 25/7 flags 1 drop 0/0
ifp em1 bytes 1230 pkts 21
List of active host mappings:
192.168.2.1 -> 0.0.0.0 (use = 4 hv = 36)
regards,
Derkjan