![]() On the basis of mention I included the important parts of the source below.ġ) both computers must have root login enabled. Therefore I see no reason to do without sending machines to sleep. There is a fancy way to build a Layer 2 tunnel with SSH, and with this WOL should work well. Make a DNAT over wan udp 9 port pointing to the machine, udp 9 port.Add the address to the arp table ("ip neigh add" stuff above).You can also send it over WAN (over the internet) without vpn, by using the same principle. When you open the program, it will send the wol package to the configured machines and then exits itself. Now you can use several tools to be able to wake the machine properly over the vpn! Now the router will try to route the package to the powered off machine, and will be able to send the package, as it knows the mac address that is fixed on the arp table! Now the mac address of the machine is known (on the br-lan network) Ip neigh add 192.168.1.45 lladdr 00:de:ad:be:gf:00 nud permanent dev And you need to install it first.įor this example, we need to wake up the 192.168.1.45 ip with the 00:de:ad:be:gf:00 mac address.įor this we will use this command (add it to the startup script from the router): On a Openwrt router, you need to use the ip package. This way the router will always know the mac address and will be able to send the packet to the machine even when it is powered off! Then the router, without that info, will drop the package.īy adding a fixed arp entry on the router. The router is going to "ask" for the mac address, but the machine is powered off, and will not be able to answer to the router. What is going to happen without the mac address? The router will not have the mac address of the machine, that is powered off and probably it will not be on the arp table anymore (default is to hold the address on the table for 6 hours before asking again). So the router needs to know the mac address of the machine to be able to send information.įor the Wake on Lan package, where is the problem? When a package for that machine arrives, it uses the mac address on the table, without asking again. Now he knows the mac address and don´t need to ask for it again(for 6 hours). When the answer arrives, the address goes to the arp table. It asks! So when it receives a package to the ip 192.168.1.45 for the first time, a package is sent via broadcast, and the 192.168.1.45 will answer. What the router do to have this mac? How does it know the mac of every machine? The package arrives, the router converts the ip to mac, and send it to the machine. When a router receives a package ( so routing is already working ok) and needs to send the packet to the machine, it needs to translate the ip to the mac address. I´m going to use a very simple explanation without detailing too much, to be easy to understand the concept. What happens is that people route packages correctly but does not know why they can´t wake on lan the device.Īs arp protocol (address resolution protocol - arp) is done automatically, people don´t have much knowledge on how it works, to proper understand the problem. This means configuring the VPN gateway/finding an option, to forward broadcast traffic from VPN remote clients to the local network.Ģ - Converting the ip to mac address. So routing it is really straightforward, the issue may lie with broadcasting it correctly from the target VPN gateway. As long as the VPN client has the correct routes, it can send a broadcast packet such as 192.168.1.255 (a broadcast address) correctly to the VPN gateway across the internet. Most implementations of the magic packet use UDP port 9 although this really does not matter as long as it is routed correctly and transmitted on the same broadcast domain as the target computer. So essentially it becomes a matter of getting a regular routable packet to the target host with the "magic" sequence inside its payload. The reason for this is the "magic" sequence can be anywhere within the payload. Yes the WOL magic packet is defined within the constrains of layer 2 but this does not mean it cannot be contained inside a network and transport protocol entity which can then be used to route it across the VPN. Old thread but I wanted to chime in because it is still the top rated search result for "wol over vpn".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |