Jump to content

Recommended Posts

Posted

Trying to set up a reverse proxy using Nginx to protect my IP from being exposed when using a domain. I've found the settings required to get a Minecraft server working, changed them to the vintage story ports and I'm able get in contact with the server, however packets don't download. I know this is an issue with the proxy considering when i route the domain directly to my IP the packets download without issue. I'm assuming I'm missing data transfer permissions of some type but honestly have no idea what I'm doing.

nganx settings.jpg

server2.png

server1.png

  • 10 months later...
  • 11 months later...
Posted

I'm pretty confused here... which IP are you trying to protect? Because the whole point of the Domain Name System is to turn domains into IPs.

I'm gonna presume you have the following situation:
Server A: Hosts nginx currently, and your domain name points to this
Server B: Hosts the Vintage story server
You are trying to have clients connect to Server A and Server A just forwards that traffic to Server B

I personally don't think nginx is the right tool for this job, but apparently it can handle it. You seem to be missing some required directives though.
This will likely fail if Server B is behind NAT.
 

stream {
    upstream vintage_backend {
        server <Server_B_IP>:42420;  # Replace with Server B's IP or hostname
    }

    server {
        listen 42420;  # TCP listener on Server A
        proxy_pass vintage_backend;
        proxy_protocol on;
        proxy_responses 0;
        proxy_bind $remote_addr transparent;
    }

    server {
        listen 42420 udp reuseport;  # UDP listener on Server A (reuseport helps with high traffic)
        proxy_pass vintage_backend;
        proxy_protocol on;
        proxy_responses 0;
        proxy_bind $remote_addr transparent;
    }
}

 

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.