Wysie
Occasional Visitor
Hello,
I've managed to set up Wake on LAN, and also added some port forwarding rules so I can do a wake on WAN as well, but the Wake on WAN portion doesn't work.
I've the following 2 rules set up for this:
Port Range: 9
Local IP: 192.168.1.50
Local Port: 9
Protocol: TCP/UDP
Port Range: 7
Local IP: 192.168.1.50
Local Port: 9
Protocol: TCP/UDP
May I know what else I need to do? I'm hoping to be able to wake up the PC remotely as it's also my Plex Media Server. I've also done the following but it doesn't seem to be working:
I've a workaround at the moment based on this (https://github.com/RMerl/asuswrt-merlin/wiki/WOL-Script-Wake-Up-Your-Webserver-On-Internet-Traffic):
The code above is working for me. However, it also means that any scan that hits 32400 will wake up my PC, something I'd prefer to avoid.
Thanks!
I've managed to set up Wake on LAN, and also added some port forwarding rules so I can do a wake on WAN as well, but the Wake on WAN portion doesn't work.
I've the following 2 rules set up for this:
Port Range: 9
Local IP: 192.168.1.50
Local Port: 9
Protocol: TCP/UDP
Port Range: 7
Local IP: 192.168.1.50
Local Port: 9
Protocol: TCP/UDP
May I know what else I need to do? I'm hoping to be able to wake up the PC remotely as it's also my Plex Media Server. I've also done the following but it doesn't seem to be working:
Code:
arp -i br0 -s 192.168.1.50 FF:FF:FF:FF:FF:FF
I've a workaround at the moment based on this (https://github.com/RMerl/asuswrt-merlin/wiki/WOL-Script-Wake-Up-Your-Webserver-On-Internet-Traffic):
Code:
#!/bin/sh
INTERVAL=5
NUMP=3
OLD=""
TARGET=IP Address without quotes
PORT=32400
IFACE=br0
MAC=MAC Address without quotes
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
The code above is working for me. However, it also means that any scan that hits 32400 will wake up my PC, something I'd prefer to avoid.
Thanks!
Last edited: