🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.openbsd-pf
Article #72

double NOT in rules is not working as expected

#72
From: Bojidara Marinchovska
Date: Fri, 08 Apr 2011 10:38
35 lines
1842 bytes
Hello,

netif="netif"
test1="1.2.3.4"
test2="2.3.4.5"

block in quick on $netif from {!$test1, !$test2} to x.x.x.x - blocks the 
access from the IPs from test1 and test2 macros, BUT it should block all 
other EXCEPT this ones

--
block in quick on $netif from {$test1, $test2} to x.x.x.x - this rule 
works as expected
--
block in quick on $netif from {!$test1, $test2} to x.x.x.x - this rule 
works as expected
--
block in quick on $netif from {$test1, !$test2} to x.x.x.x - this rule 
works as expected

I know example rule :

block in quick on $netif from {!$test1, !$test2} to x.x.x.x

can be replaced with:

pass in quick on $netif from {$test1, $test2} to x.x.x.x
block in quick on $netif from any to x.x.x.x

In the example I used macors, also tried with tables or direct inserting 
IP addresses instead of using macros or tables, but it does not work as 
expected

So it is possible to use {$test, $test1}, but isn't "double negation" as 
following: {!$test1, !$test2} ?
Technical Details
Message-ID: <4D9EE14F.5010400@bobi.gateit.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!newsgate.newsguy.com!newsp.newsguy.com!mdrn

Show Full Headers
Complete Article Headers
X-Google-Thread: ff4ef,d780e65cf81f4123,start
X-Google-NewGroupId: yes
X-Google-Attributes: gidbffa70e3,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!newsgate.newsguy.com!newsp.newsguy.com!mdrn
From: quintessence@bobi.gateit.net (Bojidara Marinchovska)
Newsgroups: bit.listserv.openbsd-pf
Subject: double NOT in rules is not working as expected
Date: 8 Apr 2011 03:38:43 -0700
Organization: None
Lines: 41
Message-ID: <4D9EE14F.5010400@bobi.gateit.net>
NNTP-Posting-Host: [192.168.1.247]
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1251; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Date: 8 Apr 2011 10:38:44 GMT