[ 
https://issues.apache.org/jira/browse/GUACAMOLE-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Felix Fischer resolved GUACAMOLE-1592.
--------------------------------------
    Resolution: Workaround

I ended up setting guacamole to send a wol packet to itself (i.e. the internal 
ip of the server) and then using socat to reroute all traffic coming from UDP 
port 9 to TCP port 9009, on which sshd is listening and tunnels all traffic to 
TCP port 9009 on the rpi. There I use socat a second time to grab all TCP 
traffic from port 9009 and broadcast it to 255.255.255.255:9. I did this by 
following a mix of these two guides: 

[https://unix.stackexchange.com/questions/77874/transform-a-udp-unicast-packet-into-a-broadcast/77877#77877]

[https://stackpointer.io/network/ssh-port-forwarding-tcp-udp/365/]

Specifically, these are the systemd services that I run now:

Rpi:

/etc/systemd/system/socat-wol-local.service
{code:java}
[Unit]
Description=Redirect tcp traffic from port 9009 to udp broadcast
After=network.target
 
[Service]
ExecStart=socat -dd tcp4-listen:9009,reuseaddr,fork 
UDP-DATAGRAM:255.255.255.255:9,broadcast
Restart=on-failure
RestartSec=5
 
[Install]
WantedBy=multi-user.target{code}
/etc/systemd/system/wol-tunnel.service
{code:java}
[Unit]
Description=SSH tunnel to oracle
After=network.target
 
[Service]
ExecStart=autossh -M 0 -o ServerAliveInterval=45 -o ServerAliveCountMax=2 -i 
/home/user/.ssh/id_rsa -N -R 9009:localhost:9009 user@server
Restart=on-failure
RestartSec=5
 
[Install]
WantedBy=multi-user.target
{code}
VPS:

/etc/systemd/system/socat-wol-public.service

 
{code:java}
[Unit]
Description=Redirects WOL magic packet from udp port 9 to tcp port 9009 for ssh 
tunnel
After=network.target
 
[Service]
ExecStart=socat -dd -T15 udp4-recvfrom:9,reuseaddr,fork tcp:localhost:9009
Restart=on-failure
RestartSec=5
 
[Install]
WantedBy=multi-user.target
{code}
This makes it so I can just have any wol packet sent on port 9 end up in my 
home network through a secure connection.

 

> Send Wake-on-LAN via remote computer
> ------------------------------------
>
>                 Key: GUACAMOLE-1592
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-1592
>             Project: Guacamole
>          Issue Type: Wish
>          Components: guacamole-server
>            Reporter: Felix Fischer
>            Priority: Minor
>
> I don't know if bug is the correct type of issue for my question, but I would 
> like to be able to use the wake on LAN function, but relayed through another 
> computer.
> I have guacamole running on a public VPS, however I use ssh tunnels to 
> connect to my home machines. I have a Raspberry Pi that is always running and 
> connected via ssh port forwarding, so it would be great if I could somehow 
> use the pi to wake up my main machine when I try to connect to it.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to