Wol about cmd and Openvpn

Hello NG,

I am looking for a way to carry out a WOL via a cmd from the VPN network.
WOL via the ipfire add-on works but I cannot make this available to the users.
Is there any other way to solve this? So far I have tried different wol tools but without success. Maybe someone can help here?

Run the wol command on one of the other computers on the network accessed via OpenVPN.

If all computers are turned off then install a Raspberry Pi as an always on low power computer that you can then run the wol command on to wake the other computer(s).

1 Like

I understand that @anwin wants ordinary users to be able to give the commands.

Are you thinking about Raspberry Pi + etherwake?

You could make etherwake suid root or add /usr/sbin/etherwake to /etc/sudoers file.

Hi @tphz

Yes that was what I was thinking of.

Hi Paul,

That would also work. :+1:

just copy it in?
and with the next update it will be gone, right?
ok i’m going to test it

I have to ask again …
how should I do that? The normal user has windows and I would like to make this available via a cmd that starts with the login via openvpn. Drive mapping works this way. The goal would be that he starts his own PC via WOL and then starts an rdp file. Everything as automated as possible.

@support IPFIRE
can’t I set up the Ipfire so that it can run for a normal user?
as an openvpn user e.g. ??

Yes you can create a “normal” user in the IPFire console that could then be given sudo rights in the sudoers file to only access the etherwake command. Probably the most secure way to have the windows users run the etherwake command would be by a scripted SSH command, specifically running the etherwake command in IPFire. The specially created user would have ssh keys created and installed for making the connection. Don’t use any existing users within IPFire for doing this.
That specially created user would then have to be given the sudo rights for etherwake without needing a password because the user would not be in the console to provide the password but running the command via ssh.
You would also need to lockdown the ssh connection to IPFire so that the windows systems can only run the etherwake command and not get login access to the IPFire console.

All the above is capable of being done. Whether it is a wise thing to do, to give windows systems even tightly controlled access to the IPFire console, is another question. I personally would not do that.

The suggestion I gave previously of using a RPi as the WOL server on your LAN would basically do the same thing and would need to be set up the same way but the only service program would then be etherwake. I would strip out all unneeded programs or use Arch Linux whose base install is effectively just the OS giving you command line access but no services. Then you could install etherwake, sudo and ssh.

it’s all too complicated, I’m gonna have to try to work this out some other way.
I don’t want to limit security in any way, nor do I want to set up an extra device for it. then I can also set up teamviewer with wol. But I would rather use RDP than Teamviewer.
Thanks anyway