preprocessor questions

Reinhard Haller reinhard.haller at interactive-net.de
Thu Dec 2 08:03:55 PST 2004


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



More information about the freebsd-ipfw mailing list