FiveM via SSH Tunnel (Server)


Up to date? Yes.
Did you try to delete caches.xml and try again? I guess caches.xml is local? So, no.
Error screenshot (if any) None
System specifications Intel Core i5 3470, 8g RAM, 150gb HDD.
What server did you get this issue on? Ubuntu Server 16.04

What am I trying to do?
Since I’m behind a NAT-network I cannot open ports. That’s why I’d like to use SSH tunneling via a VPS. I’m already doing this for other games/services.

SSH Tunneling command:
screen -dmS ssht autossh -M 1337 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -R 30120:localhost:30120 <user>@<vps-ip/hostname> -p <port>
What this command essentialy does is bind my local port to the remote port. Thus routing all traffic through the tunnel no matter what way it goes.

What I’ve tried
I’ve tried changing

endpoint_add_tcp ""
endpoint_add_udp ""


endpoint_add_tcp "<vps-ip>:30120"
endpoint_add_udp "<vps-ip>:30120"

but with no luck.

Other info:
To be clear, the server starts up just fine and works great. The only part that doesn’t work is routing traffic through an SSH Tunnel.
I looked into the code very quickly and found this file. I’m not a c++ programmer but it looks like it’s where the server is getting its hostname. If you were allowed to pass a hostname argument in when starting the server to overwrite the return of GetHost(), I think it could work? I’m just speculating here, I could be waay off.

Packages of interest:

  • ssh
  • autossh
  • screen

Also, props for supporting Markdown here on the forum.


Does this actually forward UDP traffic?

If not, and there being no option for it either, maybe can help.