What is the easiest way to turn off the wifi connection in my home at night? [duplicate]
Solution 1:
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.
Solution 2:
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
Solution 3:
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.