[winswitch] nat2nat end-to-end solution using Xpra ?
antoine at nagafix.co.uk
Sun Apr 26 16:39:31 BST 2020
On 26/04/2020 04:59, Dr Agile via shifter-users wrote:
> I want to connect to a computer behind NAT.
> Is there an end-to-end guide / solution using Xpra?
> Possibly using a self-hosted broker, on my own server.
> I'm new here, and can't find my way through all the possibilities.
That's probably because there are many ways of doing that.
Until xpra supports NAT traversal:
most will revolve around using SSH, VPN or netcat to bounce the traffic
off your server.
Simple example (untested) using TCP mode tunneled via SSH:
* start xpra on your "computer behind NAT", ie:
xpra start --start=xterm --bind-tcp=0.0.0.0:10000
* create a back tunnel from that computer to your "server"
ssh -R 20000:localhost:10000 theserver
(keeping this ssh session alive is left as an exercise)
* create a tunnel from your client PC to your server:
ssh -L 30000:localhost:20000 theserver
* then you can connect over those tunnels with:
xpra attach tcp://localhost:30000/
I've used different port numbers to try to make it clearer what connects
where - though that's not actually required, you could just use the same
port number everywhere.
Another option would be to forward your computer's SSH server port to
Then you could connect "directly" to your computer using an ssh proxy
command, or using xpra's "2hop ssh" mode which is available from the
More information about the shifter-users