>>Никак не могу разобраться с ipfw, в частности с in, out, recv
>>и xmit.
in via rl0
и
recv rl0
по сути одно то-же
кроме того recv и xmit могут указываться вместе, при входе пакета в систему, по таблице маршрутизации определяется его дальнейшая судьба и назначается выходной интерфейс, по этому можно фильтровать пакеты типа так
recv rl0 txmit rl1
in и out взаимно исключаемы
man ipfw
....
in | out
Matches incoming or outgoing packets, respectively. in and out
are mutually exclusive (in fact, out is implemented as not in).
....
recv | xmit | via {ifX | if* | ipno | any}
Matches packets received, transmitted or be going through,
respectively, the interface specified by exact name (ifX), by
device name (if*), by IP address, or through some interface.
The via keyword causes the interface to always be checked. If
recv or xmit is used instead of via, then only the receive or
transmit interface (respectively) is checked. By specifying
both, it is possible to match packets based on both receive and
transmit interface, e.g.:
ipfw add deny ip from any to any out recv ed0 xmit ed1
The recv interface can be tested on either incoming or outgoing
packets, while the xmit interface can only be tested on outgoing
packets. So out is required (and in is invalid) whenever xmit is
used.
A packet may not have a receive or transmit interface: packets
originating from the local host have no receive interface, while
packets destined for the local host have no transmit interface.