LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-15-2011, 05:32 PM   #1
sunnieside-up
Member
 
Registered: Aug 2011
Distribution: Debian
Posts: 68

Rep: Reputation: Disabled
How to WOL a server through internet


Hi all,

I'm trying to wol a fedora 15 server through the internet. Now I've tried port forwarding and broadcasting to 192.168.0.255 and 192.168.0.0, but that doesn't work, and my router doesn't support wol, so I've given up on that. Now I'm wondering if there's any way of connecting to a windows computer that's on, on the local network, and have that wol my server (without logging out the person on the windows computer). I know this is technically a windows question, but I figure you linux gurus would know more than the windoze noobs out there. Thanks!
 
Old 09-15-2011, 05:52 PM   #2
tristezo2k
LQ Newbie
 
Registered: Oct 2009
Distribution: debian ubuntu solaris FreeBSD
Posts: 26

Rep: Reputation: 4
cygwin can be the answer. run an sshd daemon on the windows box.
That means you will need administrator access to run it and to run a software capable of generating the WOL packet.
Maybe this can be of help
http://www.ezlan.net/WOL.html
 
Old 09-15-2011, 07:56 PM   #3
samborambo
LQ Newbie
 
Registered: Dec 2004
Location: New Zealand
Distribution: Ubuntu LTS
Posts: 10

Rep: Reputation: 0
WOL is a layer 2 function (ethernet), not layer 3 (internet). You can't wake a NIC using an IP address. NICs don't have a TCP/IP stack and the CPU is asleep. The magic packet is an ethernet packet containing the MAC address of the NIC you're trying to wake. Ethernet packets don't get through routers.

Sam.
 
Old 09-15-2011, 08:04 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
http://www.dd-wrt.com/wiki/index.php/WOL

http://www.ezlan.net/WOL.html

http://wol.dtools.net/

the list goes on.
 
Old 09-16-2011, 04:52 AM   #5
sunnieside-up
Member
 
Registered: Aug 2011
Distribution: Debian
Posts: 68

Original Poster
Rep: Reputation: Disabled
My router won't forward the WOL packets, but thanks for the cygwin suggestion, it's the thing I need!
 
Old 09-17-2011, 01:12 AM   #6
tristezo2k
LQ Newbie
 
Registered: Oct 2009
Distribution: debian ubuntu solaris FreeBSD
Posts: 26

Rep: Reputation: 4
Quote:
Originally Posted by sunnieside-up View Post
My router won't forward the WOL packets, but thanks for the cygwin suggestion, it's the thing I need!
If you go that way, you will still need a windows binary to generate the WOL packet.
You can ssh from internet and run the windows executable from cygwin. I don't see any cygwin binary supporting WOL ( http://www.cygwin.com/packages/ )
 
Old 09-17-2011, 03:54 PM   #7
sunnieside-up
Member
 
Registered: Aug 2011
Distribution: Debian
Posts: 68

Original Poster
Rep: Reputation: Disabled
That's alright, I compiled it from source!
 
Old 09-17-2011, 11:24 PM   #8
tristezo2k
LQ Newbie
 
Registered: Oct 2009
Distribution: debian ubuntu solaris FreeBSD
Posts: 26

Rep: Reputation: 4
Quote:
Originally Posted by sunnieside-up View Post
That's alright, I compiled it from source!
WEll, i think there is a cygwin sdk or dev environment somewhere. However, I wouldn't expect a low level tool, designed to create arbitrary packets in linux, would work on windows. But, YMMV.
Regards
Sebastian
 
Old 09-25-2011, 05:07 PM   #9
barlafues
LQ Newbie
 
Registered: Sep 2011
Posts: 3

Rep: Reputation: Disabled
Quote:
Originally Posted by sunnieside-up View Post
I've tried port forwarding and broadcasting to 192.168.0.255 and 192.168.0.0, but that doesn't work, and my router doesn't support wol, so I've given up on that.
Unless your router is explicitly discarding incoming packets snooping in their payload for WOL signatures, which I doubt, here is your problem. When your computer is awake, your router knows that 192.168.0.x is taken by computer with MAC address say 10:9a:dd:71:55:60 . This mapping is in the ARP table of the router. When your computer goes to sleep, this ARP entry eventually is marked stale and discarded or replaced. At that moment, your router does not know anymore where to forward traffic for that address.

You can produce WOL packets from remote. These are wrapped into IP packets to be delivered to your router. When the packet gets to your router, however, the router has no clue where to forward it to, because there is no ARP entry for that host. You can verify this by trying to wake your computer from remote shortly after stand-by (should work) and long after (will not).

You have 2 ways around it:
  • configure your router to statically route packets to the IP of your sleepy computer to its own physical port
  • access to your router's text console and issue the WOL command from it. OpenWRT et al allow you to do this
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to start/ wake a PC over the internet (WOL) maodonovan LinuxQuestions.org Member Success Stories 1 09-25-2012 11:53 AM
7.10 Server wol (wake-on-lan) via ARP (no magic packet), help? Elohist Linux - Networking 0 01-21-2008 12:02 AM
Server WOL and standby ATrx2k Linux - Networking 1 04-25-2004 09:23 AM
Server WOL and standby ATrx2k Linux - Software 0 04-24-2004 04:28 PM
Wol hakcenter Linux - Networking 5 10-07-2003 12:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration