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.
  • You need to know the MAC address of the device.  Last year, offn posted the command to use via ssh:

    /usr/sbin/ether-wake -i INTERFACE MAC


    for example

    /usr/sbin/ether-wake -i eth0 00:11:22:33:44:55



    Cheers - Bob
    PS Yes, you can set 'Static MAC/IP Mappings' in Astaro DHCP.
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Yes, I saw the ssh commands, however in this case it's not what I'm looking for.

    I actually already have my PC set as as a DHCP static mapping, however I don't believe this helps me in this case as it seems that the ARP lookup routine doesn't consult the DHCP mappings to check for IP to MAC translation information.
  • If your PCs motherboard supports UDP WOL, then setting up a DNAT on a specific port to your internal PC should do the trick.

    Barry
  • Yeah, it does, for about 60 seconds.  After this time period WOL does not work over the Internet, but does over the LAN.  From what I've read I believe that this is to do with ARP record caching on Astaro; the ARP cache entry for my PC is purged ~60 seconds after my PC goes into sleep mode and the firewall is then no longer able to forward packets to it due to not having an corresponding ARP entry and also not being able to query the PC because it is 'off'.
  • Is anyone able to confirm my diagnosis and / or suggest a fix / workaround?

    Would the 'fake ip' to mac broadcast commands in the script in this post be of use?
    https://community.sophos.com/products/unified-threat-management/astaroorg/f/55/t/44967
  • Would the 'fake ip' to mac broadcast commands in the script in this post be of use?
    http://www.astaro.org/astaro-gateway-products/web-security-web-filtering-application-visibility-control/35980-wake-waf-wan-magic-web-application-firewall.html#post166327


    Yes. You need that to get it to work via a DNAT rule. Ignore the rest of that post regarding use the WAF to wakeup.

    You only need to create the 'fake IP'broadcast static ARP entry and a DNAT rule (Usually: SRC any, DST Port UDP 9, translating to 'fake IP').

    But please be aware that this digs hole into the firewall: Any computer from outside may send packets to all computers in your internal network to UDP Port 9.
  • Thanks for your reply Mario.

    I guess I could create a fake IP to mac address entry using the actual mac address of the PC I want to wake right?  Of course this would mean I would need one fake  IP per PC I want to wake, but in my case I only need to wake one PC, so not really an issue [:)]

    The other question is will this static ARP entry be permanent or do I need to do something else to make it survive a reboot?
  • I'm not sure. Normally, WOL packets are broadcast packets and what you describe won't do that. If that works, you won't need 'fake IP' at all, just a static ARP entry for the PC to wake. But you can only wakeup one single PC then.

    ARP entries don't survive reboots (and time, as you already found out ;-)), thats why the script is in runlevel 3 (check the filename of the script in mentioned posting and also make it executable)
  • FWIW, what I do is keep a list of the ARP addresses in a text file in the loginuser's home folder; ssh in to the firewall, and run etherwake to wake up the PCs.

    I realize that would be painful on a phone, but it is possible on Android.

    Barry
  • ARP entries don't survive reboots (and time, as you already found out ;-))


    Hmm, so are you saying that even if I create a static ARP entry it will still be flushed after the ~60sec time period?

    FWIW, what I do is keep a list of the ARP addresses in a text file in the loginuser's home folder; ssh in to the firewall, and run etherwake to wake up the PCs.

    I realize that would be painful on a phone, but it is possible on Android.
    Barry


    Yeah, that's my problem with the current methods, I'm looking for a single click (or very quick to use) solution. Thanks for the suggestion tho [:)]