From: "Martin A. Brown" <mabrown-lartc@securepipe.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] policy routing at its best
Date: Sat, 08 Mar 2003 02:44:40 +0000 [thread overview]
Message-ID: <marc-lartc-104709187530950@msgid-missing> (raw)
In-Reply-To: <marc-lartc-104696497925588@msgid-missing>
Hi there, Tomas,
Welcome back from your trip away!
: the goals i had when beginning with this, for you that have not follow
: mine and martins thread, was to
:
: 1) only let 192.168.1/24 to see all routes,
: 2) not route between defined networks, except to and from 192.168.1/24
: 3) not defined networks should only be able to reach 192.168.1/24
:
: this might sound simple. it wasnt for me.
Policy routing is difficult to describe in any language. And thinking
about it isn't that easy either.....
: two routing tables, one called "ALL" that, suprisingly, held routes to
: all networks defined and a default route to internet. the other called
: "main", just for ease, that held one route to 192.168.1/24 and had a
: default prohibit.
:
: the one rule that exists just says "if src = 192.168.1/24 use table
: ALL". of course there is an additional rule, the standard one that says
: "from all lookup main" with a number of 32766.
:
: so, for you that doesnt understand my poor english, literally every
: network that passes, except from 192.168.1/24, will use the main table
: that just holds the route to 192.168.1/24 and the prohibit one.
:
: this so simple, something just has to be wrong. feel free to englighten
: me.
What an elegant solution, Tomas! I also could not believe how simple the
solution appeared at first, so I wrote it down (my notes are below), and I
find this a far simpler solution than anything either of us came up with
before. It's neat to see the RPDB harnessed in this way.
Congratulations on your elegant solution,
-Martin
# -- RPDB addition
#
ip rule add from 192.168.1.0/24 lookup ALL
#
# -- implicit rule below
#
# ip rule add prio 32766 from all lookup main
#
# -- table ALL
#
ip route add table ALL $NETA via $ROUTERA
ip route add table ALL $NETB via $ROUTERB
ip route add table ALL $NETC via $ROUTERC
ip route add table ALL default via $ROUTERINET
#
# -- table main
#
ip route add 192.168.1.0/24 dev eth0
ip route add default prohibit
# -- all packets (to be routed) with source address of ANYWHERE
# are only allowed to have destinations in 192.168.1.0/24
# -- all packets (to be routed) with source address of 192.168.1.0/24
# are allowed to connect to any network
--
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/
next prev parent reply other threads:[~2003-03-08 2:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-06 15:31 [LARTC] policy routing at its best Tomas Bonnedahl
2003-03-08 2:44 ` Martin A. Brown [this message]
2003-03-11 16:32 ` Tomas Bonnedahl
2003-03-11 17:07 ` Tomas Bonnedahl
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-104709187530950@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.