define the list of ports as a macro and use pfctl -D

not much adding as it is replacing the whole list:
$ echo 'pass proto udp from port $pl' | pfctl -nvf- -Dpl='{1 2 3}'
pass proto udp from any port = 1 to any
pass proto udp from any port = 2 to any
pass proto udp from any port = 3 to any

On Thu, Dec 8, 2011 at 6:45 AM, John Tate <[email protected]> wrote:
> Is there a way to have it so I can add ports from the command line if I
> can't use tables?
>
> On Thu, Dec 8, 2011 at 10:14 PM, Peter Hessler <[email protected]> wrote:
>
>> Yes, tables in PF only support IP addresses.
>>
>>
>> On 2011 Dec 08 (Thu) at 22:11:19 +1100 (+1100), John Tate wrote:
>> :At the moment I am working on doing some things as tables. I want tables
>> to
>> :hold the ports, but it appears perhaps they can only hold IP addresses.
>> The
>> :following tables do not work from line 10-11...
>>
>> --
>> Renning's Maxim:
>> B  B  B  B Man is the highest animal. B Man does the classifying.
>>
>
>
>
> --
> www.johntate.org

Reply via email to