[HELP] GRE Tunnel / Reverse Proxy Setup / CURL 7 Refusing Connection

Hey all,

I am trying to configure a GRE Tunnel for my FiveM Server running Centos 7.

I have the GRE Tunnel configured correctly via a shell script with all network interfaces configured correctly. I verified that the Tunnel is online and the network interface for the tunnel is responding to ICMP requests (ping).

FiveM servers (by default) listens for UDP and TCP traffic on all interfaces of the machine that you’re running it on (0.0.0.0). Because of this, I only want it to listen on my local tunnel IP 10.16.2.38 which is bound via NAT to a proxied public IP address (this should work but it’s not).

Now, when I try to run the FiveM server and set the endpoints in my server.cfg to my local tunnel IP, the server will run, but no one can connect and it does not respond. It’s refusing the connection via CURL because the backend server is not detecting a service running on port 30120.

This is what is in the endpoints of my server.cfg:

endpoint_add_tcp "10.16.2.38:30120" # Local Tunnel IP Address and port
endpoint_add_udp "10.16.2.38:30120"# Local Tunnel IP Address and port

instead of:

endpoint_add_tcp "0.0.0.0:30120" 
endpoint_add_udp "0.0.0.0:30120"

I have created Firewall Rules to allow all connections through port 30120 both on the network level and service level (iptables).

My question is, because the backend server is not recognizing that 10.16.2.38 is running the FiveM service hence refusing the connection and closing the running port (30120), how would I get the server to recognize that the FiveM service is running on that port with the tunneled IP address?

Here are some screenshots:

Thanks to anyone who can help.

Have you updated your sv_endpoints?

@ChristopherM Yes. Scroll up, you’ll see my endpoint configuration.

I did not and still do not see your sv_endpoints values, only your endpoint_add_tcp/udp values, which are not the same. My understanding, as per the documentation I linked, is that endpoint_add_tcp/udp is for your local address, not your tunnel IP as you have set it to, and sv_endpoints is for your public tunnel IP.

Here is a screenshot of our functioning server cfg as an example:
image
Where 30121 is the port of the server instead of 30120, the hidden ports at the end of endpoint_add_tcp/udp are simply mapped to 30121 internally, and where funnel3 is our tunnel ip.

1 Like

Thank you very much! That worked for me! :slight_smile:

1 Like