All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin A. Brown" <mabrown-lartc@securepipe.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] negate ip addresses
Date: Wed, 04 Jun 2003 13:05:24 +0000	[thread overview]
Message-ID: <marc-lartc-105473202732531@msgid-missing> (raw)
In-Reply-To: <marc-lartc-105471426914632@msgid-missing>

Lars,

 : is it possible to make rules or routes with negated ip addresses like
 : that:

You can simulate this with the following technique:

# ip rule add table xyz
# ip route add $ALLOWED_DESTINATION table xyz
# ip route add throw default

Strictly speaking, this might require a bit more gyration to accomplish
your desired syntax, while still allowing you to reach your goal.

The "throw" route type allows you to create sets of tables which can be
used to "negate".

  http://linux-ip.net/html/routing-rpdb.html
  http://linux-ip.net/html/routing-tables.html#routing-table-entries

 : ip rule add from ! 192.168.0.0/16 table xyz

The closest suggestion I can make to your desired syntax would be to use
two routing tables.

# ip rule add from 192.168.0.0/16 table notxyz
# ip rule add blackhole from 192.168.0.0/16
# ip rule add table xyz

The first two rules would take care of all packets bound from
192.168.0.0/16, and the last rule would effectively handle any packets
which were from ! 192.168.0.0/16.

These would need to be higher priority (lower number) in the RPDB in order
for this to function properly.

 : Or is this planned for the future?

I have no idea.  I'd bet the answer is "no", but you could probably get it
straight from the linux-net horse's mouth if you asked.

-Martin

-- 
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

      reply	other threads:[~2003-06-04 13:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-04  8:09 [LARTC] negate ip addresses Lars Täuber
2003-06-04 13:05 ` Martin A. Brown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-105473202732531@msgid-missing \
    --to=mabrown-lartc@securepipe.com \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.