Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

pfctl : recursive parsing of groups

From: Stephen Samuel <samuel(at)bcgreen.com>
Date: Sun Mar 30 2003 - 23:42:39 EST


for pfctl's parsing of pf and nat rules, a grouping is currently defined as
  group ::= NAME | '{' NAME [ , NAME ...] '}'   How difficult would it be to define it as
  group ::= NAME | '{' group [ , group ...] '}'

The reason for this is that I ran into a situation where I defined something like the following:

int = "{ xl1, xl2 }"
ext = " xl0 "

For the most part, this works fine, because I tend to define packets in terms of either coming from the inside or the outside, but when cheking for wormsign, I ran into the following construct:

block in log on { $int, $ext } proto udp from any port 2002 to any port 2002

This, of course, fails because the { $int, $ext } expands to: { { xl1, xl2 }, xl0 }
which is currently illegal.

My workaround was:

either = "{ xl0, xl1, xl2 }"
# apache worm.
block in log on $either proto udp from any port 2002 to any port 2002

Do you need help?X

In this specific case I could also just remove the 'on' construct, but I'd prefer to have the IF designation there for completeness. (it also works in case a 4th interface gets added that doesn't actually fit in the group).

-- 
Stephen Samuel +1(604)876-0426                samuel@bcgreen.com
		   
http://www.bcgreen.com/~samuel/
Powerful committed communication, reaching through fear, uncertainty and
doubt to touch the jewel within each person and bring it to life.
Received on Sun Mar 30 23:44:52 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:52 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library