Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Dec 2004 17:03:33 +0100
From:      "Reinhard Haller" <reinhard.haller@interactive-net.de>
To:        <freebsd-ipfw@freebsd.org>
Subject:   preprocessor questions
Message-ID:  <s1af4af6.004@fs-inter.interactive.de>

next in thread | raw e-mail | index | archive | help
Hi,

I'm using cpp as preprocessor for my firewall rules.

I'd problems specifying macros.

#define RULE __LINE__
#define ldap 389
#define ldaps 636
#define all_ldap 389,636

sample1:
add RULE pass tcp from 192.168.0.0/24 to any ldap,ldaps  setup
keep-state

sample2:
add RULE pass tcp from 192.168.0.0/24 to any all_ldap  setup
keep-state

Sample 1 produces an error, while sample 2 is working. Why?

Trying to specifiy hosts by name doesn't work either.

#define PGP_SERVER 63.251.255.12
#define NAME_PGP keyserver.pgp.com 

sample3:
add RULE pass tcp from 192.168.0.0/24 to PGP_SERVER all_ldap  setup
keep-state

sample4:
add RULE pass tcp from 192.168.0.0/24 to NAME_PGP all_ldap  setup
keep-state

Sample 4 ends up in an error message.

Any ideas?

Thanks
Reinhard



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?s1af4af6.004>