[LARTC] how to remove rules
Chris Bennett
chris@symbio.com
Tue, 23 Nov 2004 11:48:28 -0600
I've had the same problem. I sorta wish there was an "ip rule flush"
command that would leave only the default rules.
Anyway, what I do to prevent my rules from getting out of hand is every time
I add a rule, I first delete the very same rule. This prevents the
duplicates, at least.
So every place in my script that I might have:
IP RULE ADD <some rule>
I place before it:
IP RULE DEL <some rule>
Works for me.
----- Original Message -----
From: "Askar" <askarali@gmail.com>
To: <lartc@mailman.ds9a.nl>
Sent: Tuesday, November 23, 2004 4:57 AM
Subject: [LARTC] how to remove rules
> hi
> I have trying to remove the extra rules from my routing tables,
> however with no luck
> Also I want to know these duplicate entries have an effect on packets
> going routed?
> I have this overwhelming rules lists from my predessor who added the
> "ip rule add fwmark" entries in firewall script, and on each run of
> firewall script its creates an extra entry in routing table.
> Now what I want to get rid of an extras "from all fwmark 0x2 lookup
> squid.out" leaving only one that what's I needs.
>
> here is the output of "ip rule ls"
>
> 0: from all lookup local
> 32742: from all fwmark 0x2 lookup squid.out
> 32743: from all fwmark 0x2 lookup squid.out
> 32744: from all fwmark 0x2 lookup squid.out
> 32745: from all fwmark 0x2 lookup squid.out
> 32746: from all fwmark 0x2 lookup squid.out
> 32747: from all fwmark 0x2 lookup squid.out
> 32748: from all fwmark 0x2 lookup squid.out
> 32749: from all fwmark 0x2 lookup squid.out
> 32750: from all fwmark 0x2 lookup squid.out
> 32751: from all fwmark 0x2 lookup squid.out
> 32752: from all fwmark 0x2 lookup squid.out
> 32753: from all fwmark 0x2 lookup squid.out
> 32754: from all fwmark 0x2 lookup squid.out
> 32755: from all fwmark 0x2 lookup squid.out
> 32756: from all fwmark 0x2 lookup squid.out
> 32757: from all fwmark 0x2 lookup squid.out
> 32758: from all fwmark 0x2 lookup squid.out
> 32759: from all fwmark 0x2 lookup squid.out
> 32760: from all fwmark 0x2 lookup squid.out
> 32761: from all fwmark 0x2 lookup squid.out
> 32762: from all fwmark 0x2 lookup squid.out
> 32763: from all fwmark 0x2 lookup squid.out
> 32764: from all fwmark 0x2 lookup squid.out
> 32765: from all fwmark 0x2 lookup squid.out
> 32766: from all lookup main
> 32767: from all lookup 253
>
> regards
>
>
> --
> (after bouncing head on desk for days trying to get mine working, I'll
> make
> your life a little easier)
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>