On Sun, Mar 28, 2010 at 03:10:09PM -0700, VY wrote:
> Thanks for your reply. I am a networking novice so maybe there is something
> that I am doing wrong.
> I just did this:
>
> sudo route del -net 98.171.145.0/24 dev eth0
>
> and got back
>
> SIOCDELRT: No such process
>
>
> I do not have a static route to that subnet in my routing table but I want
> to cut off traffic to any of the 255 hosts in that subnet for a short period
> of time -- hence I want to delete access to that network.
> Am I using the wrong tool?
Yep, you can't delete a route that isn't there.
You could add a route for that network that points to an address which can't
route to the network, for example:
sudo route add -net 98.171.145.0/24 gw 127.0.0.1
or if you just need it for the current host you could add an iptables rule to
block traffic:
sudo iptables -I OUTPUT -d 98.171.145.0/24 -j DROP
if the current host is your router then the iptables rule would be:
sudo iptables -I FORWARD -d 98.171.145.0/24 -j DROP
Note: my iptables examples are horribly simplified things.
--
Michael Rasmussen, Portland Oregon
Trading kilograms for kilometers since 2003
Be appropriate && Follow your curiosity
http://www.jamhome.us/
The Fortune Cookie Fortune today is:
Knucklehead: "Knock, knock"
Pee Wee: "Who's there?"
Knucklehead: "Little ol' lady."
Pee Wee: "Liddle ol' lady who?"
Knucklehead: "I didn't know you could yodel"
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug