Lookup tables with dst-port as argument

Andrey V. Elsukov bu7cher at yandex.ru
Wed Jan 20 16:43:30 UTC 2021


On 20.01.2021 18:26, Patrick Tracanelli wrote:
> Hello FreeBSD community,
> 
> I need to dynamically allocate filtering ports on a tuplet, table
> would do the job, can I lookup the port argument from a table?
> Something like:
> 
> ipfw add count all from “table(blist)” to any dst-port tablearg in
> 
> In the above example table blist was created as “ipfw table blist
> create type number”.
> 
> It certainly won’t work as above written since tablearg is not
> supported for dst-port.
> 
> Is there any other approach possible to reach this desired behavior?

Hi,

it seems you need to take alook at the 'lookup dst-port tablename' opcode.

-- 
WBR, Andrey V. Elsukov


More information about the freebsd-ipfw mailing list