This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

WOL over the Internet

I know this topic has been discussed in the past, however, in each case there has not been an actual detailed solution tabled, only alternative workarounds.

I am wanting to send a WOL packet via my Android smartphone to my home PC.  I have the latest Astaro v8 free running on a dedicated machine.  I can do this successfully for ~60 seconds after the machine is put to sleep but this then fails to work due to the ARP cache entry expiring.  Astaro is setup with a DNAT forwarding port 9 to my PC as it seems that it will not transmit a broadcast via NAT.

There are a number of potential solutions to this problem:
1) Setup a static ARP entry
2) Setup bridging

I am not sure if #1 is possible with Astaro, does anyone know this?

#2 was suggested in a couple of the previous WOL discussions, however I am unsure of the theory of how this would work in conjunction with the existing NAT setup or the repercussions of doing so (in particular with respect to security).  Is anyone able to enlighten me on the details of this particular setup?

Any info would be greatly appreciated.

Cheers,

Sam.


This thread was automatically locked due to age.
Parents
  • Could you please explain what you did in detail for working this out? I'm looking for exactly the same, but I'm still confused on whats the right way.

    Thanks in advance.
  • Here is a summary of trollvottel's solution:

    Create a file called 'S99wol' in '/etc/init.d/rc3.d/' with the following contents:

    #!/bin/bash

    # At the ASG, create a DNAT for UDP Traffic Port 9 to $DNATDST

    # Configuration
    NIC=eth0 #LAN ethernet card
    DNATDST=10.12.28.2  #Fake IP on your subnet

    # Map traffic going to the fake IP to be broadcasted to the entire LAN
    ip neigh change $DNATDST lladdr ff:ff:ff:ff:ff:ff nud permanent dev $NIC > /dev/null 2>&1
    ip neigh add    $DNATDST lladdr ff:ff:ff:ff:ff:ff nud permanent dev $NIC > /dev/null 2>&1


    ..and then make it executable with:
    chmod u+x S99wol


    You also need to create a DNAT rule:
    Traffic Source: Any
    Traffic Service: UDP Destination Port 9
    Traffic Destination: WAN
    Destination: 'Fake IP'
    Destination Service: UDP Destination Port 9


    Then reboot the firewall, put your machine to sleep, then try sending a WOL packet (using the mac address of the target machine) over the Internet (Note that WOL packets redirected in this way will not be captured by a WOL packet capture utility on the target machine.

    Note that this configuration is a bit of a nasty hack and opens the entire LAN subnet to incoming port 9 UDP traffic, but at the moment, it's the only config which enables you to have a one click WOL over Internet solution.

    Let me know if you have any issues and I'll do my best to assist.
  • Thank you very much for your posting!
    I tried this in my network except for rebooting my firewall (just called the script .\S99wol) and its working fine.

    This workaround or nasty hack as you called it isn't a problem for me because I'm using this to wake up a client in my lan from my wireless (different subnets). So I changed the DNAT rule from "any->udp 9->wan->host to wake up" to "my host in wireless subnet->udp 9->wireless interface->host to wake up". So this host is the only device allowed to send traffic on port 9 udp.

    FYI, I'm using this to wake up a client in my lan via phone call to a wireless/dect router in my wireless which starts a script on specific phone numbers received.

    Thanks for helping me out with this!
Reply
  • Thank you very much for your posting!
    I tried this in my network except for rebooting my firewall (just called the script .\S99wol) and its working fine.

    This workaround or nasty hack as you called it isn't a problem for me because I'm using this to wake up a client in my lan from my wireless (different subnets). So I changed the DNAT rule from "any->udp 9->wan->host to wake up" to "my host in wireless subnet->udp 9->wireless interface->host to wake up". So this host is the only device allowed to send traffic on port 9 udp.

    FYI, I'm using this to wake up a client in my lan via phone call to a wireless/dect router in my wireless which starts a script on specific phone numbers received.

    Thanks for helping me out with this!
Children
No Data