I am a little confused about the documentation about the use of a self-hosted Zrok instance as I am a little new to networking concepts. For some context, I used to host my game servers on a local machine using Docker and I would setup reverse SSH tunnels to route traffic through a cheap Google VPS I had for free to expose the ports to the public. The issue now is that SSH doesn't support UDP (to my knowledge) so I found Zrok.
Could someone provide clarification if I could self-host Zrok on my Google VPS and be able to route my local machine network through it and essentially achieve the same functionality (TCP/UDP)? Thanks in advance.
There's a more straightforward option than self-hosting your zrok instance that works with a cheap VPS to enable a TCP or UDP proxy (like a port forward).
On the VPS, you run this to expose your private zrok share on a public port:
zrok access private {token} --bind 0.0.0.0:4321
If the backend has mode tcpTunnel
then it will open a TCP port, and a UDP port if backend mode udpTunnel
.
Ensure the VPS's firewall allows the bind port you choose for the correct transport protocol: TCP or UDP.
If we are self hosting, is it possible to set up a public tcpTunnel share?
If you want to expose a tcpTunnel
share publicly, you'll still use zrok share private
, and you'll just run a zrok access private -b <publicIp:port> <token>
on a machine with public internet access, and that will give you a "public" tcpTunnel
share...
You can do that with either the service at zrok.io, or with your own zrok instance. Either way, you'll need to run zrok access private
on a machine connected to the internet.
Hope this makes sense.
Q beat me to it. If you're interested, i did a video on my own channel showing people how to do this with Minecraft -- if interested. Shows you how to do exactly what @michael.quigley stated but in video form.
1 Like