Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
How to disable internet access at night on the router?

I have teenagers who stay up all night and skype with their friends on their laptops.

Is there a way I can turn this off at a certain time every night without having to physically unplug my AT&T Gateway modem? I am not very computer savvy. Sorry if this sounds silly....

share|improve this question

marked as duplicate by Keltari, TFM, ChrisF, Ƭᴇcʜιᴇ007, Hennes Nov 25 '12 at 16:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

11  
Get one of those AC timers :P –  Bob May 22 '12 at 22:58
    
all joking aside. a timer plug is the easy option. –  Sirex May 22 '12 at 23:26
    
"easiest" could mean "simple" (as in just unplug something), or "convenient (but expensive)" (as in get new equipment that has parental controls or at least a WiFi on/off switch). –  sawdust May 22 '12 at 23:27
    
@Sampo I don't use/have OS X, not do I use Linux much. Can't really help on the software side. –  Bob May 23 '12 at 0:02

5 Answers 5

You can check your wireless device and look for an "Access Restrictions" type section? Some Wireless routers (and other devices) have these settings, where you can set what times of day internet access is blocked. You can essentially schedule the hours and days to forbid access.

I have a LinkSys E4200, which has that capabilities. You can google for "Linksys Access restrictions". Other brands probably have it too. The cleanest way to secure it.

Otherwise, a simple AC timer will work, until they realize they can just plug it in.

share|improve this answer
1  
Good answer; I think every router I've owned has had this feature. Just keep in mind that if you don't physically secure the router, anyone could simply reset it back to its default settings to clear the schedule. –  rob May 22 '12 at 23:46

With Mac OS X and/or Linux (most distributions):

You can use task scheduler cron to enable/disable network connectivity. There is different ways to do that, at this time we will use utility program calledifconfig to disable only selected wlan interface. This however is foolproof only if user does not have permissions to bring up network or reboot machine. If restarting is allowed for users you should replace ifconfig with command than either removes wlan0 from boot scripts or modifies wlan0 configuration files to render interface useless. some keywords: rc, /etc/hostconfig, unix init, linux service, osx bootup

First you need to know wlan interface name. I will use wlan0 as interface name within this post and you should replace that with your interface name if it's not same. Interface name can be checked with ifconfig command at terminal (command prompt, console).

Open your crontab file for editing:

crontab -e

Add one line for disabling Wi-Fi adapter wlan0 and another line for enabling it:

30  18  *   *   *   ifconfig wlan0 down
30  5   *   *   *   ifconfig wlan0 up

After saving changes cron runs first line at 18:30 and wlan0 is disabled, second line executes at 5:30 and wlan0 is enabled again.

With Microsoft Windows

you can use scheduled tasks to enable/disable interfaces but first you need to write batch files that really does job for you.

Web is full of netsh commands to do this, however there is small but: netsh set interface only works with Windows Server. If you happen to run server os then netsh is way to go, otherwise continue reading.

First find out network adapter device ID, this can be done from cmd using Windows Management Interface Console, WMIC:

wmic NIC GET index,name

and output will be somethin similar to:

wmic NIC GET index,name
Index  Name
0      WAN Miniport (SSTP)
1      WAN Miniport (IKEv2)
2      WAN Miniport (L2TP)
3      WAN Miniport (PPTP)
4      WAN Miniport (PPPOE)
5      WAN Miniport (IPv6)
6      WAN Miniport (Network Monitor)
7      Intel(R) PRO/1000 MT Desktop-adapter
8      WAN Miniport (IP)
9      Microsoft ISATAP Adapter
10     RAS Async Adapter
11     Teredo Tunneling Pseudo-Interface

Here, I dont care about WAN Miniports or any other pseudo adapters but Intel(R) PRO/1000 MT Desktop-adapter looks like real network device so I will write down index number 7.

After that it is good to test that command really works by running it from command line, if your adapter happens to have some other devid change index=<YourAdapterIndex>:

### Do not copypaste this code, check index first
wmic path win32_networkadapter where index=7 call disable

Network adapter should be disabled now. Then try to enable it again:

wmic path win32_networkadapter where index=7 call enable

If it works well, then write cmd batch files that can be run through task scheduler:

disable_wlan.cmd contents:

wmic path win32_networkadapter where index=7 call disable

and enable_wlan.cmd contents:

wmic path win32_networkadapter where index=7 call enable
share|improve this answer
    
Very nice, but how well this works is completely dependent on how resourceful the kids are, and whether they have (or know how to get) admin privileges on their laptops. –  rob May 23 '12 at 0:08

As pcm mentioned, most routers let you set a schedule in the settings. That is probably your best first step. (Maybe you don't even want to tell the kids, and let them think that the Internet just happens to stop working each night because the Internet company sucks.) Keep in mind that if you don't physically secure the router, your kids could simply reset it router back to its default settings to clear the schedule.

A more tamper-resistant option would be to use a device like the GameDR--it's a timer that's physically locked onto the power plug. Although this particular one doesn't look like it will work with wall warts, there might be others; or you could improvise your own with a cashbox/lockable box and standard AC plug timer.

Ultimately, it may be more about laying down the rules and getting your kids to respect and follow them (I know, easier said than done). If your kids are determined enough, they will circumvent any artificial barriers you put up. For example, they might buy their own router, hop on a neighbor's WiFi, tether the laptop to a phone with wireless Internet, or go retro and just use a phone.

share|improve this answer

why don't you find a nice parental control software and install on their PCs to block internet access at night. They essentially have password protection.

share|improve this answer

Some of the electric receptacles in some houses work on a wall switch, e.g. for lamps but it's usually the top receptacle that works on a switch and the bottom one is always live. You could hook your router up to a receptacle that can be shut off by the switch when not in use but I don't know if it's recommended to be shut off or not.

share|improve this answer
    
Your "facts" are pretty dubious. "Usually the top receptacle"? –  Isaac Rabinovitch Nov 25 '12 at 8:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.