An ssh-script to shutdown all internet traffic on remote mac?

Discussion in 'Mac Programming' started by Jiddick ExRex, Oct 12, 2007.

  1. macrumors 65816

    Jiddick ExRex

    Joined:
    May 14, 2006
    Location:
    Roskilde, DK
    #1
    My parents have a Powermac running on Airport and they want an app (or script) to shut off all internet communication when they feel the kids have been online for long enough.

    I thought I could provide it by making a location called Airport-Off with nothing but firewire enabled and then making a remote 'scselect Airport-Off' script but that won't make it possible to enable airport again :)

    What easy measures could I provide to disabling/enabling out of the house traffic from this mac via a bash script?
     
  2. macrumors 6502a

    Joined:
    Dec 4, 2006
    Location:
    Katy, Texas
    #2
    How about plugging Airport into a switched power outlet? Or, unplug the modem.

    Sorry - but that would be my low-tech approach!

    Todd
     
  3. macrumors 68000

    Joined:
    Feb 23, 2006
    #3
    ifconfig <interface> down
     
  4. thread starter macrumors 65816

    Jiddick ExRex

    Joined:
    May 14, 2006
    Location:
    Roskilde, DK
    #4
    Thx for the input.

    1. This doesn't deny the children to go down an plug the thing back in (these are problem children so I need a software approach where they are not allowed to do any physical mending)
    2. Pretty hard for our other mac to be online at the same time wouldn't you say?
     
  5. thread starter macrumors 65816

    Jiddick ExRex

    Joined:
    May 14, 2006
    Location:
    Roskilde, DK
    #5
    Just tried doing this and while working, it shuts off the current network the mac is connected to.
    1. It doesn't keep the children from rebooting the mac and going on with their business.
    2. Any new ssh attempt cannot be done because the network connection breaks.
     
  6. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #6
    The only sensible way I can see of doing this is to swap between two firewall configurations as required. One for "normal" use that enables traffic to the internet, another for "locked down" that only allows traffic to local IPs (10.0.0.x or 192.168.0.x depending on your local setup).

    You would have to have the children running in a locked down account to start with that cannot stop/start the firewall to make this worthwhile...
     
  7. thread starter macrumors 65816

    Jiddick ExRex

    Joined:
    May 14, 2006
    Location:
    Roskilde, DK
    #7
    They already are. How do I go about doing going in a locked down state?
     
  8. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #8
    Assuming this is up-to-date I'd start here
     
  9. macrumors 68000

    Joined:
    Feb 23, 2006
    #9
    Just throwing this out there:

    What happened to sitting down and talking to your children? Are we so "hands-off" these days that we create elaborate firewall rulesets, as opposed to sitting down and saying "Johnny, no going on the computer past eleven, you need to be in bed!"
     
  10. thread starter macrumors 65816

    Jiddick ExRex

    Joined:
    May 14, 2006
    Location:
    Roskilde, DK
    #10
    I understand what you are saying but allow me to elaborate.
    These are children in family care placed by the state in the hands of my parents' professional educational hands. My parents have three weeks left to decide whether the 12-year kid needs to be sent off to a daily institution for 24-hour intensive care.

    Another badly chosen conflict through simple computer rules are not what these kids need.

    So while I agree with your overall statement, technology together with damaged children who need a helping educational hand can be a help. We have the technology to do so and in this circumstance it's a well chosen tool for channeling the conflicts to something useful and more educational (like why it's not ok stealing from other people opposed to why the kid should not stay up all night surfing the net).

    Was that clear enough?
     

Share This Page