问题原文
原帖链接 · Richard Lapthorn · CC BY-SA 3.0
I am trying to find a way to turn on my work PCs remotely via OpenVPN. The PCs are connected to a router which is on the subnet of another router owned by the people who manage our building. When the PCs are powered on, I can access them fine using RDP via my OpenVPN connection.
I can power the PCs on by going into my router management GUI and starting them from there, however I don't want to give my staff access to the router and it is them who I need to give access to.
Is there any way I can power on the PCs when tunnelling through OpenVPN?
社区高分解答
原帖链接 · Michal Sokolowski · CC BY-SA 3.0
Is it possible to WOL via OpenVPN?
Yes it is.
Is there any way I can power on the PCs when tunnelling through OpenVPN?
Yes, you've got following options:
- use OpenVPN in bridge mode (VPN & LAN share layer 2 segment, TAP device),
- forward UDP port 9 at your router from VPN side (when using VPN layer 3 subnet with TUN device),
- forward UDP port 9 at your router form Internet side.
Newbie hints:
Layers?
http://www.cisco.com/cpress/cc/td/cpress/fund/ith/ith01gb.htm#xtocid166847
https://en.wikipedia.org/wiki/OSI_model
Configuring router port forwarding:
Most routers do not allow you to forward to broadcast, however if you can get shell access to your router (through telnet, ssh, serial cable, etc) you can implement this workaround:
$ ip neighbor add 192.168.1.254 lladdr FF:FF:FF:FF:FF:FF dev net0
Source: https://wiki.archlinux.org/index.php/Wake-on-LAN
Enabling Wake On Lan on the network adapter (Linux way):
ethtool -s eth0 wol g
Enable WOL via /etc/networks/interfaces (Debian, Ubuntu, Mint probably too):
$ cat /etc/network/interfaces.d/eth0
auto eth0
iface eth0 inet dhcp
ethernet-wol g
Linux tools:
wol -p forwarded_port -i router_IP target_MAC_address
wakeonlan -i 10.0.0.255 FF:00:00:00:00:30
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
