ipfw2: How to detect packets without incoming interface?

nisse at hubsch.org nisse at hubsch.org
Thu May 15 14:01:44 PDT 2003


In ipfw1 I could use "recv any" to indicate that a packet originated on a
remote host. To for example prevent tcp traffic from being forwarded
trough the host but still allow traffic to/from the host on all interfaces
it was possible to say

ipfw add deny tcp from any to any out recv any
ipfw add allow tcp from any to any

How do I do this with ipfw2?
I want to detect locally generated packets.

netinet/ip_fw2.c does't seem to handle the "any" case and ipfw2.c contains
the following lines:

  /* Parse the interface or address */
   if (!strcmp(arg, "any"))
         cmd->o.len = 0;         /* effectively ignore this command */

--
 Mikael Hubsch



More information about the freebsd-ipfw mailing list