PF will this work in pf?

I will be testing this, but I'm not there yet, so I thought I would ask to see if anyone knows.

Let us assume there is a pf table named mylistofaddresses which contains something like 30K individual IP addresses. Periodically, this table is added to or subtracted from.

Let us say that one of those addresses is 123.123.123.123.

Now, at some point, the address range 123.123.123.0/24 comes floating by as an address range to be deleted from the table (which contains no address ranges, only individual addresses).

If I delete this address range using the command:
Code:
pfctl -t mylistofaddresses -T delete 123.123.123.0/24

will the entry 123.123.123.123 be deleted? I suspect the answer is no, though it would be hugely convenient if the answer is yes. Obviously, in this case, I would prefer to not have to parse the entire address range to delete addresses within the range from the table.
 
Well, I ran the test. And, as I suspected, the answer is "no".

So I have to extract every IP address in the range I am given and individually try to remove it. Que sera sera.
 
Back
Top