Skip to contentSkip to conversation

Questions on rules syntax

DISCUSSION Scott Hall 3 participants 3 messages Feb 12, 2004

lore
Share & tools
lore

Scott Hall

author
#0 lore raw

I am trying to add a rule that covers part of a class C range. I want to allow 10.0.0.50 through 10.0.0.254 or simply deny .1 through .50 then allow the whole range. Is there a syntax that will allow me to do this in one rule? I have searched extensively before bugging the list for help.

thanks,

Signature · 2 lines
Scott Hall
ArosNet Consulting
#1 lore raw
Quoted 7 lines

I am trying to add a rule that covers part of a class C range. I want to allow 10.0.0.50 through 10.0.0.254 or simply deny .1 through .50 then
allow the whole range. Is there a syntax that will allow me
to do this
in one rule? I have searched extensively before bugging the list for help.

If you search on www.netfilter.org in the Patch-O-Matic Base repository, you can find :
http://www.netfilter.org/patch-o-matic/pom-base.html#pom-base-iprange

For this, you will have to patch and recompile your own kernel as I don't think this functionality is enabled in a default kernel from a Linux distro.

Gr,
Rob

#2 lore raw
In reply to Scott Hall

It looks like you'll just have to do the math or get someone who likes doing it:

ALLOW 10.0.0.128/25
This allows 128-255.
ALLOW 10.0.0.64/26
This allows 64-127.
ALLOW 10.0.0.56/29.
This allows 56-63.
ALLOW 10.0.0.52/30
This allows 52-55.
ALLOW 10.0.0.50/31
This allows 50-51.

REJECT 10.0.0.0/27.
This rejects 0-31.
REJECT 10.0.0.32/28
This rejects 32-47.
REJECT 10.0.0.48/31
This rejects 48-49.

Register your team online today!
BOWL FOR KIDS'SAKE 2004
Saturday, March 6, 2004
www.bfkscentralohio.org
You'll be "bowled over" when our brochure "strikes" your mailbox at the end of January.sorry.we couldn't help ourselves! If you do not receive one, please contact me!

==============================================================
Chris Baker -- technical specialist
614-839-2447x108 -- [email protected] www.bbbscentralohio.org -- Big Brothers Big Sisters of Central Ohio Opinions expressed in this e-mail are solely my own.

The document(s) accompanying or within this email transmission may contain confidential information belonging to Big Brothers Big Sisters of Central Ohio, which is legally privileged for the entity named above. If you are not the intended recipient, you are hereby cautioned that any disclosure, copying, distribution, or the taking of any action in reliance on the contents of this email information is strictly prohibited. If you receive this email in error, please notify us immediately by fax (614-839-5437) or phone (614-839-2447) to advise of the error.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Scott Hall
Sent: Thursday, February 12, 2004 12:54 PM
To: [email protected]
Subject: Questions on rules syntax

I am trying to add a rule that covers part of a class C range. I want to allow 10.0.0.50 through 10.0.0.254 or simply deny .1 through .50 then
allow the whole range. Is there a syntax that will allow me to do this
in one rule? I have searched extensively before bugging the list for help.

thanks,

Signature · 2 lines
Scott Hall
ArosNet Consulting