On Thu, Feb 26, 2004 at 12:38:34AM +0100, Darek Eliasz wrote:
> 
> > I'm getting an error with the following:
> >
> > all_web = "{" $web1 $albums "}"
> Should be:
> all_web = "{ $web1, $albums }"

  nonono.  commas do not matter for this!

  i see people give this advice frequently.

  if you check the GRAMMAR section, the only comma that doesn't appear in
  [ "," ] is the one in icmpsection of 'return'.

  i have no comma in any rule in my pf.conf, works fine.

> > pass in quick proto tcp from any to $all_web port = { 80 443 }  keep state
> Shoul be:
> pass in quick proto tcp from any to $all_web port  { 80, 443 }  keep state

  it is true that you need to get rid of the equals

$ echo 'web1="127.0.0.1"\nalbum="192.168.7.17"\nallweb="{" $web1 $album "}"\n\
pass in quick proto tcp from any to $allweb port { 80 443 } keep state' |\
sudo pfctl -nvf-

  gives:

web1 = "127.0.0.1"
album = "192.168.7.17"
allweb = "{ 127.0.0.1 192.168.7.17 }"
pass in quick inet proto tcp from any to 127.0.0.1 port = www keep state
pass in quick inet proto tcp from any to 127.0.0.1 port = https keep state
pass in quick inet proto tcp from any to 192.168.7.17 port = www keep state
pass in quick inet proto tcp from any to 192.168.7.17 port = https keep state

  jared

-- 

[ openbsd 3.4 GENERIC ( feb 14 ) // i386 ]

Reply via email to