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

Setup NAT rule for Wake on wan

Hello, I have a Microsoft home server which goes to sleep using the lights out application. 
This application supports WOW which would allow me to have the server sleep during the day and then I can just wake it when I need it.
Details on the lights out feature here
Wake On Wan - We Got Served Forums

Here is how I have it setup:
DNAT: ANY - Port 9 UDP - internal (LAN) (Broadcast) - Destination: MS Home Server
Destination Service - [empty]
Auto Packet Filter Rule, Log Packets

But it is dropping the incoming traffic still. What am I missing?


This thread was automatically locked due to age.
  • Hi, if you want this to work from the internet, the DNAT needs to have the firewall's External Address as the first destination, e.g.

    DNAT: ANY - Port 9 UDP - External Address - Destination: MS Home Server
    Destination Service - [empty]

    Barry
  • Cheers for that.. clicked that I had set it wrong last night[:$] It is passing it though now. I have not had a chance to confirm it works but the first hurdle has been passed anyway[:P]
  • Well I just tested this and I am not quite there yet. The issue I now have is that for the destination I need to use the Internal (LAN) (Broadcast) as a Wake on Lan packet is a broadcast packet.
    However Astaro will not let you set the destination as the broadcast network. Any ideas on how to get around that?[:S] I have tried setting up my own network definition but it will not let you setup a broadcast network definition.
  • Hi, what if you create a network definition for a Host, with the IP address equal to your network broadcast address, and use that for the DNAT destination?

    Barry
  • Well it let me create the definition however it still does not seem to work. I see it get passed by the firewall but I cannot tell if it actually is forwarded to .255 or not. Is there anywhere in the firewall where I could monitor what is happening once it gets passed by the firewall?
  • OK found this in the packet log (have changed my IP to ***. etc)
    2010:02:15-13:10:35 crossley ulogd[3005]: id="2000" severity="info" sys="SecureNet" sub="packetfilter" name="Packet logged" action="log" fwrule="60021" seq="0" initf="eth1" outitf="unknown" dstmac="00:04:75:9a:75:e8" srcmac="00:00:00:00:00:00" srcip="72.167.98.173" dstip="***.***.***.***" proto="17" length="130" tos="0x00" prec="0x00" ttl="48" srcport="48759" dstport="9"
  • Was the dstip the .255 broadcast IP, or something else?
    Since it says action=log, the firewall didn't drop the packet, so that's a good start.

    You can run tcpdump on the console, or a sniffer on your LAN, to see if the packet is coming into your LAN with the broadcast address.

    Barry
  • destip is my external IP address.

    So is outitf="unknown" what would be expected? As far as using tcpdump is there a "how to" somewhere?
  • The first DestIP should be your external IP.

    The second DestIP needs to be your internal broadcast; that's what I'm asking about.

    tcpdump has tons of documentation online.

    Barry
  • I'm having the same issue.  

    When the destination on the NAT is set to the IP address of the host I want to wake up, I see the packet get to the host.  When the destination is set to a broadcast address, either the local broadcast or the full broadcast address, I don't see the packet come on the wire.

    Seems as if the firewall doesn't want to forward to broadcasts addresses.  It needs the broadcast address since the host is sleeping and won't respond to arp requests to try a directed packet.

    I'm going to see if I can configure a static arp entry on the firewall for my destination IP to see if I can get the firewall to forward to that mac address.

    The firewall should be able to broadcast to broadcasts but I don't see that happening.