How to PXE boot over WAN
Solution 1:
This should work, from the ssh docs:
-R remote_socket:local_socket
Specifies that connections to the given TCP port or Unix socket on the remote (server) host are to be forwarded to the given host and port
Because port 69 is a privileged port, you must also know that:
Privileged ports can be forwarded only when logging in as root on the remote machine.
First modify dnsmasq.conf and change your dhcp-boot option; the destination port will be the raspberry pi.
From your local laptop,
$ ssh [email protected] -R 69:69
Once this port forward is established, attempt to reboot the Debian machine.
On PXE Boot, the machine should get the DHCP boot option pointing to the pi.
The TFTP request over port 69 will enter the port opened by the SSH tunnel, sending that packet out onto 127.0.0.1:69 on your local laptop.
Assuming you are running the TFTP server on port 69, the image should be downloaded.