Teamspeak 3 Reverse Proxy [NGINX] [WireguardVPN] [IFS]

Hello, everybody,

I am currently looking for help with a small problem. Some time ago my internet service provider put me and my connection behind a carrier grade nat. This causes me to have several problems with external connections to my home server.

To solve this problem I have now added an Internet-Facing-Server via WireguardVPN and tunnel corresponding traffic through it via a NGINX Reverse Proxy. Unfortunately it is difficult for me to build a working configuration for my Teamspeak 3 server because the topic of the reverse proxy is still relatively new territory for me.

Are there people who have already implemented something like this ? Or does anyone have an example config for such a thing ? Is there anything special to consider when you want to bypass the traffic of Teamspeak through a proxy?

I would be glad about help because my friends and I use the Teamspeak server quite regularly.

With kind regards

1 Like

I just recently had some similar problems…
So first make sure your nginx is build with stream.
My conig is this:

        #TS server main port
        server {
                listen 9999 udp;
                listen [::]:9999 udp;
                proxy_pass ts3_stream_backend;
                proxy_timeout 60s; #not needed
        }

        upstream ts3_stream_backend {
                server censored:6653;
                server 127.0.0.1:9987 backup;
        }

        #TS server file port
        server {
                listen 30033;
                proxy_pass ts3_stream_files;
        }

        upstream ts3_stream_files {
                server censored:30033;
                server 127.0.0.1:30032 backup;
        }

I use this to provide a fallback server if the censored one is unreachable for some reason.
I’m not sure if this is indeed enough for you, as your problem seems to be a lot more sophisticated than just a basic reverse proxy.
Also make sure the given config is part of the stream directive.

1 Like

Hi,
do you actually use Nginx UDP Reverse Proxy for your TS3? I tried it myself with a simple test config:

stream {
            server {
                    listen 9987 udp;
                    listen [::]:9987 udp;
                    proxy_pass 10.0.0.2:9987;
                    error_log /var/log/nginx/ts3.log;
            }
    }

However it doesn’t work, on wireshark I can see some traffic, I also tried changing the Port on the Nginx server, it seems like something tells the ts3 server that it doesn’t like, also my version is

Address:10.0.0.2
Version:3.9.1 on Linux
License:Activation License
Uptime:76 days 11 hours 59 minutes 6 seconds
Current Channels:257
Current Clients:101 / 512 
Current Queries:2 / 512

My ISP uses CGNAT meaning I am unable to use my IP address to host any servers. I have a VPS connected with a Wireguard VPN which I use for my Plex server. I want to add a TS3 server to my reverse proxy, but it isn’t working like my Plex config did.

  • I have opened ports 9987 UDP and 30033 TCP on the docker compose nginx file
  • I have opened the ports on the VPS
  • I have opened the ports on my router
  • Then on nginx proxy manager I have created two streams for 9987 UDP and 30033 TCP and forwarded them to the ip of my Wireguard tunnel: 10.66.66.2

I would now expect that when I try to connect to the ip of my VPS where my nginx proxy manager is hosted, that traffic would be routed to my Wireguard VPN and then connect to the server. But when I try to connect I get an error.

Does anyone know what else is missing, this solution works for my Plex server by connecting to VPS ip with port 32400. What do I need to add for TS3 to connect?