大网数据广告活动
服务器运维问答

Is it possible to WOL via OpenVPN?

· 52CE 我爱测

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 acc…

问题原文

原帖链接 · 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

man wol

wakeonlan -i 10.0.0.255 FF:00:00:00:00:30

man wakeonlan

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-06-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。