Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Nov 2021 09:26:15 +0300
From:      =?UTF-8?B?w5Z6a2FuIEtJUklL?= <ozkan.kirik@gmail.com>
To:        freebsd-pf@freebsd.org
Subject:   matching receive interface and xmit interface in single rule
Message-ID:  <CAAcX-AGRQR9e5Z-8q38P29crLB8TER=zB2ny_omcyHP-Phgmvg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

I'm looking for a solution to match a traffic received on igb0 and xmit on igb1.
According to man page, ipfw(8) supports this syntax:

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.


I used an workaround for this requirement:
- pass quick in on igb0 all keep state (if-bound) tag rule1_IN_IGB0
- pass quick out on igb1 all tagged rule1_IN_IGB0 keep state (if-bound)


But this syntax has disadvantages:
- if tags used for NAT, one of the tags will be lost Because of pf has
only single tag support.
- reading and writing of rules become complicated

Is it possible to add support for this feature like ipfw or
alternatively is it possible to have a separate tag for nat tag?

Have a nice day
Regards



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAcX-AGRQR9e5Z-8q38P29crLB8TER=zB2ny_omcyHP-Phgmvg>