1. Does anybody know if eth0 has an alias in the /dev filesystem?
2. How would I go about setting up a script that would automatically redirect input/output from a given device until I tell it to stop re-directing?
I'm in a class with a few mischief-makers at the moment; Everybody is using Red Hat Linux 7.3, except me--I brought in my own Red Hat 8.0 CDs. The point is, the environment is fairly heterogenous. I'm expecting, any day now, somebody to attempt to access my machine. (We're supposed to make our root passwords "password"; I haven't)
What I'd like to do is set up a shell script, which must be executed as root, which simply takes any packets coming in from the network and throws them directly to /dev/null. Any time I'm not actively using network resources, I can just run this script. Then, when I need access to the network again, I just hit ctrl+c.
As an added bonus, it'd be nice if I could make eth0 respond to any requests with a stream of garbage from /dev/urandom, but I don't just want to redirect /dev/urandom to eth0, as that would probably slow up the *entire* network.
of course, I could always unplug my network card when I'm not using it, too
EDIT: Actually, if I ran "cat /dev/null > /dev/*whatever eth0 is*" in an endless loop, would that not do absolutely nothing until someone talked to my NIC, and then return an EOF character to the requesting machine? That would be good. My final script could be three lines long, including the call to #!/bin/bash.