Temporarily stop network access

Discussion in 'Mac Basics and Help' started by askywalker, Aug 28, 2007.

  1. askywalker macrumors regular

    Joined:
    Aug 18, 2007
    #1
    Is there a way to temporarily stop network access?

    I usually use a LAN cable, so I could unplug it, but I thought there might be a more elegant solution. I don't see any icon that represents this ethernet connection's status - but I do see that I can check it out under System Preferences | Network. Is there a way to get an icon similar to the Power|IME|Sound|Airport...

    Cheers!
     
  2. CanadaRAM macrumors G5

    CanadaRAM

    Joined:
    Oct 11, 2004
    Location:
    On the Left Coast - Victoria BC Canada
    #2
    Flying Buttress can do it, it's scriptable so presumably you could put together a tiny Applescript to turn it on and off.

    Someone also sells a switch that can disconnect the physical LAN cable.
     
  3. askywalker thread starter macrumors regular

    Joined:
    Aug 18, 2007
    #3
    Interesting - with so many cool icons and such, I was hoping that I was just missing the OS X Network Icon. Flying Buttress looks cool - but wouldn't that only stop the incoming traffic? I could try it myself, but my Windows days have taught me to install apps sparingly and with extreme caution. :)
     
  4. garybUK Guest

    garybUK

    Joined:
    Jun 3, 2002
    #4
    sudo int ifdown en0

    in termianll. jobs done. put it in a shell script and put a pretty icon on it if you want.
     
  5. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    Create a new location and de-activate all the network ports in that location. Whenever you want no network just switch to that location.
     
  6. askywalker thread starter macrumors regular

    Joined:
    Aug 18, 2007
    #6
    Thanks!

    Thanks for all the great suggestions. I thought the location idea sounded simple - and actually I hadn't noticed the locations before - so wanted to learn them as I travel frequently. It works really well. Now if I could just convince 'Little Snitch' developers to add the option to filter all network activity except for a specific application I would be even happier. :p

    btw - Gary thanks for pointing out the script way to do it. This is something I will be playing with in the future - but right now I just don't have enough time to get my head around it.
     
  7. Cider macrumors newbie

    Joined:
    Sep 10, 2006
    Location:
    Liverpool
    #7
    I like Gary's suggestion. To simplify the matter you could create a script to toggle the port on and off.

    Code:
    #!/bin/sh
    # Script to toggle en0 (iMac primary network port) on and off.
    # -- Cider (Rhys) 29/08/07
    #
    if [ `ifconfig en0|grep -c "UP"` -eq 1 ]
    then
    echo Bringing network down
    sudo ifconfig en0 down
    else
    echo Bringing network up
    sudo ifconfig en0 up
    fi
    Rhys
     
  8. garybUK Guest

    garybUK

    Joined:
    Jun 3, 2002
    #8
    Couldn't have done it better myself :)
     

Share This Page