Click to See Complete Forum and Search --> : How to stop the net


Sea Wolf
11-09-2001, 07:45 PM
I have a cable modem and i'd like to just leave my linux running for a while just to see how it would do over the weekend. I'm new to linux and im just feeling things out. What i wanted to know was, Is there a command or something i could use to totally stop all internet activity and then start again on another command? Something like the stop button on ZoneAlarm.

Pras
11-09-2001, 07:49 PM
You can just disable your network card. Which distro are you using? Usually, each distro will come with options to disable your nic. But, a generic command is to use 'ifconfig eth0 down'.

Sea Wolf
11-09-2001, 07:50 PM
I'm on redhat 7.1. I just want it to stop for a while til i get back on....will using that same command and then using "up" start my ethernet card again?

X_console
11-09-2001, 07:52 PM
Yes.

Hena
11-11-2001, 10:39 AM
Another command to stop all internet activity in RH is (i'm not on linux, so can't be 100% sure about the path) "/etc/rc.d/init.d/network stop". For more control, you can also use commands "start" and "restart" instead of stop. This will stop all nic's from working, eth0 down will stop interface eth0.

berb
11-11-2001, 02:54 PM
or, if you want to have some fun looking at your logs, which btw is a good learning tool, issue
# /sbin/ipchains -A input -l -j DENY
which will deny all incomming traffic and log the attempts in /var/log/messages. to turn it back on use:
# /sbin/ipchains -F input
which 'flushes' the rules in the input chain

kinda fun to look at the logged attempts for connection to the box, 95% of mine are on windows share ports (137-139). stupid script kiddies ;).

DMR
11-11-2001, 08:28 PM
The most secure way to separate your box from the Net is to just disconnect the ethernet cable between your NIC and the modem. Seriously- no muss, no fuss, no software configuration, and no doubts.
;)