All of lore.kernel.org
 help / color / mirror / Atom feed
* quick syntax query
@ 2004-06-07 10:53 Knight, Steve
  2004-06-07 11:06 ` Raileanu Grigore
  2004-06-07 11:54 ` John A. Sullivan III
  0 siblings, 2 replies; 3+ messages in thread
From: Knight, Steve @ 2004-06-07 10:53 UTC (permalink / raw)
  To: 'netfilter@lists.netfilter.org'

Hi there

Can one use syntax other than CIDR notation when defining things like
networks?

i.e. it's common to see

LAN_RANGE="192.168.0.0/24"

in rule bases, but I would like to use

DODGY_RANGE="192.168.0.1-5"
GOOD_RANGE="192.168.0.6-30"
BAD_BAD_RANGE="192.168.31-40"


a la `nmap` syntax.

Is this something netfilter can handle?

Thanks in advance


Steve




-----------------------------------------------------------------------
Information in this email may be privileged, confidential and is 
intended exclusively for the addressee.  The views expressed may
not be official policy, but the personal views of the originator.
If you have received it in error, please notify the sender by return
e-mail and delete it from your system.  You should not reproduce, 
distribute, store, retransmit, use or disclose its contents to anyone.
 
Please note we reserve the right to monitor all e-mail
communication through our internal and external networks.
-----------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: quick syntax query
  2004-06-07 10:53 quick syntax query Knight, Steve
@ 2004-06-07 11:06 ` Raileanu Grigore
  2004-06-07 11:54 ` John A. Sullivan III
  1 sibling, 0 replies; 3+ messages in thread
From: Raileanu Grigore @ 2004-06-07 11:06 UTC (permalink / raw)
  To: netfilter

On Mon, 7 Jun 2004 11:53:10 +0100
"Knight, Steve" <Steve.Knight@bskyb.com> wrote:

> Hi there
> 
> Can one use syntax other than CIDR notation when defining things like
> networks?
> 
> i.e. it's common to see
> 
> LAN_RANGE="192.168.0.0/24"
> 
> in rule bases, but I would like to use
> 
> DODGY_RANGE="192.168.0.1-5"
> GOOD_RANGE="192.168.0.6-30"
> BAD_BAD_RANGE="192.168.31-40"
> 
> 
> a la `nmap` syntax.
> 
> Is this something netfilter can handle?
> 
> Thanks in advance
> 
> 
> Steve
> 

patch-o-matic iprange patch have this feature:

The base/iprange patch:
   Author: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
   Status: Works

   This patch makes possible to match source/destination IP
   addresses against inclusive IP address ranges.

   Examples.

   iptables -A FORWARD -m iprange --src-range 192.168.1.5-192.168.1.124 -j ACCEPT
   iptables -A FORWARD -m iprange --dst-range 10.0.0.0-10.5.255.255.255 -j ACCEPT

-- 
Best regards,
Raileanu Grigore
mail: grisha at unixro dot net
phone: +40 742759147


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: quick syntax query
  2004-06-07 10:53 quick syntax query Knight, Steve
  2004-06-07 11:06 ` Raileanu Grigore
@ 2004-06-07 11:54 ` John A. Sullivan III
  1 sibling, 0 replies; 3+ messages in thread
From: John A. Sullivan III @ 2004-06-07 11:54 UTC (permalink / raw)
  To: Knight, Steve; +Cc: 'netfilter@lists.netfilter.org'

On Mon, 2004-06-07 at 06:53, Knight, Steve wrote:
> Hi there
> 
> Can one use syntax other than CIDR notation when defining things like
> networks?
> 
> i.e. it's common to see
> 
> LAN_RANGE="192.168.0.0/24"
> 
> in rule bases, but I would like to use
> 
> DODGY_RANGE="192.168.0.1-5"
> GOOD_RANGE="192.168.0.6-30"
> BAD_BAD_RANGE="192.168.31-40"
> 
> 
> a la `nmap` syntax.
> 
> Is this something netfilter can handle?
> 
<snip>
Yes, besides using CIDR and Dotted Decimal notation, one can apply the
IPRange patch-o-matic patch and use a rule such as

iptables -A FORWARD -m iprange --src-range 192.168.1.10-192.168.1.20 -j
ACCEPT

We use it all the time in the ISCS project.

If you do not want to patch, you can use SubnetCreator
(http:subnetcreator.sourceforge.net) to turn a range into a list of
subnets and then make rules for each of the subnets.  If you are using
Qt, it also provides a series of routines to do this programatically.

-- 
John A. Sullivan III
Chief Technology Officer
Nexus Management
+1 207-985-7880
john.sullivan@nexusmgmt.com
---
If you are interested in helping to develop a GPL enterprise class
VPN/Firewall/Security device management console, please visit
http://iscs.sourceforge.net 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-06-07 11:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-07 10:53 quick syntax query Knight, Steve
2004-06-07 11:06 ` Raileanu Grigore
2004-06-07 11:54 ` John A. Sullivan III

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.