Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Sep 2002 15:26:32 +0100
From:      Daniel Bye <dan@slightlystrange.org>
To:        questions@freebsd.org
Subject:   Macros in ipfw rules
Message-ID:  <20020903142632.GA71601@catflap.home.slightlystrange.org>

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

I have been reading round (man pages for ipfw, m4, etc, and Google), but
can't seem to find what I'm looking for...

I have managed to get our departmental intranet site migrated from Win2K
to FreeBSD 4.6.2 (yay me - I did good ;-), and am now having trouble with
ipfw.  I want to use a macro to prevent large groups of networks and 
hosts from connecting, but I've drawn a blank with the syntax.  I know I
can use m4 or cpp, for example, but I cannot fathom the syntax necessary
to establish the macros.

From the ipfw man page, I see this is possible:

ipfw add deny ip from netgroup1 to ${myip}

Defining netgroup1 is where I get stuck!  I know I need to predeclare 
the macro, but never having used m4 or cpp I dunno what I'm doing, and
unless I've become totally blind, I can't see examples in the man pages.

Anyone have any pointers to some docs online I can look at, or example
rules I can rip off?  Or even a "reread the man pages, you twit, there's
examples aplenty" would be OK ;-)

TIA,

Dan 

-- 
Daniel Bye

PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc
PGP Key fingerprint: 3D73 AF47 D448 C5CA 88B4 0DCF 849C 1C33 3C48 2CDC
                                                                     _
                                              ASCII ribbon campaign ( )
                                         - against HTML, vCards and  X
                                - proprietary attachments in e-mail / \

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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