fritsp1989
Regular Contributor
I had some pictures but i was unable to post them the max was 4
Hi guys, Im having trouble with this script.
I have a HP Proliant that wakes from hibernation (Linux mint 13) fine when using the WOL on the tools page.
Ive setup the jffs and scripts as per this guide but still, the machine will not wake when I, for instance, try to play on my PC some music (with WMP12) which is located on the Proliant.
Any ideas?
EDIT: One thing I have noticed, is that the logfile is nowhere to be seen at the location in the wake.sh. Do we need to create the file first?
Thanks for quick reply, so I havnt got any specific ports forwarded for just WOL yet, as I thought it didnt matter in this instance? Maybe I read the previous thread wrong :S
I have some ports forwarded for different things, which other ports need forwarding to the server?
Yeah it does wake from hibernate when I use merlins tool built in to the firmware.
Firmware 220.18b
When entering the MAC address on the script, we include the colons, right?
Yes in the format like 00:00:00:00When entering the MAC address on the script, we include the colons, right?
Note that port 443 is used by AiCloud. You cannot forward port 443 while AiCloud is enabled.
Strange situation i use aicloud and my webserver i acces ai cloud on 8082 and my webserver on 443.
Whats the difrence ?
8082 is the regular access, while 443 is the SSL secured access. I wouldn't use port 8082 when outside of your LAN if I were you, cause otherwise all the login credentials you enter in AiCloud will be sent in clear text. Not just your main router login, but also any SMB login you send while browsing your shares.
fritsp did you figure out what needed to be added to the script in order to add in specific ports to the target IP aswell?
#!/bin/sh
INTERVAL=5
NUMP=3
OLD=""
TARGET=PUT YOUR INTERNAL IP ADRESS HERE!
PORT=SPECIFY YOUR PORT HERE!
IFACE=br0
MAC=PUT YOUR MAC ADRESS HERE!
WOL=/usr/bin/ether-wake
LOGFILE="/var/log/ether-wake.log"
while sleep $INTERVAL;do
NEW=`dmesg | awk '/ACCEPT/ && /DST='"$TARGET"'/ && /DPT='"$PORT"'/ {print }' | tail -1`
SRC=`echo $NEW | awk -F'[=| ]' '{print $8}'`
DPORT=`echo $NEW | awk -F'[=| ]' '{print $27}'`
PROTO=`echo $NEW | awk -F'[=| ]' '{print $23}'`
if [ "$NEW" != "" -a "$NEW" != "$OLD" ]; then
if ! ping -qc $NUMP $TARGET >/dev/null; then
# echo "NOWAKE $TARGET was accessed by $SRC, port $DPORT, protocol $PROTO and is already alive at" `date`>> $LOGFILE
# else
echo "WAKE $TARGET requested by $SRC, port $DPORT, protocol $PROTO at" `date`>> $LOGFILE
$WOL -i $IFACE $MAC
sleep 5
fi
OLD=$NEW
fi
done
Thanks fritsp!
Can we specify more than one port using that script?
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!