I think there are two main reasons why Windows would wake up “by itself” (without pressing a key on the keyboard or clicking the mouse).
- Scheduled tasks;
- Devices allowed to wake up the computer.
Scheduled tasks are fairly simple to look into and it was not the problem at the time of writing this post, so I’ll skip straight to the second point.
We can get a list of devices that are allowed to wake up the computer from sleep by typing at the command prompt:
powercfg -devicequery wake_armed
At the time, I had 3 allowed devices:
- Intel(R) 82579V Gigabit Network Connection
- HID-compliant mouse
- Microsoft USB Natural Ergonomic Keyboard 4000 (Mouse and Keyboard Center) (001)
I don’t need WOL or anything like that so I disallowed the network card to wake up the computer using Device manager:
And voilà, my computer now stays asleep until I use the mouse or keyboard. I started having this problem after moving the computer to another network, so I suspect the new router or other network connected computers sent packets that waked it up.
% sudo pkg install py27-fail2ban
% sudo vim /usr/local/etc/fail2ban/jail.local
enabled = true
filter = sshd
action = pf
logpath = /var/log/auth.log
% sudo vim /usr/local/etc/fail2ban/action.d/pf.conf
actionban = /sbin/pfctl -t <tablename> -T add /32
actionunban = /sbin/pfctl -t <tablename> -T delete /32
tablename = fail2ban
% sudo vim /etc/pf.conf
table <fail2ban> persist
block in on $ext_if from <fail2ban>
% sudo vim /etc/rc.conf
% sudo service pf reload
% sudo service fail2ban restart
% sudo pfctl -t fail2ban -T show
or secure file sharing, a replacement for samba (windows client, accessing files on *nix server).
DokanInstall_0.6.0.exe Dokan library (http://dokan-dev.net/en)
dokan-sshfs-0201226.zip for installer and explorer context menu
dokan-sshfs-0.6.0.zip take DokanNet.dll and DokanSSHFS.exe and replace in 0201226.
Advantages secure, read/write, easy to install.
Drawback easily bottlenecks at a few MBps on slow CPU. Not multi-core. Shows bad size information. Unstable?
Goto samsung printers website
search with model name
get Set IP
(also works with Wine)
Key Operator Mode (default password is 7145)
“This paper demonstrates how to encapsulate any TCP-based protocol (SMTP, POP3, NNTP, telnet…) into HTTP”
Punching holes into firewalls
or “Why firewalls shouldn’t be considered a ultimate weapon for network security”
or “Secure TCP-into-HTTP tunnelling guide”