Serveur behind reverse proxy - connection timed out

petitminion
New member
 
Posts: 3
Joined: Mon Sep 02, 2019 14:48

Serveur behind reverse proxy - connection timed out

by petitminion » Mon Sep 02, 2019 15:03

Hey ! I'm trying to create a server on debian buster. I followed the instructions in https://wiki.minetest.net/Setting_up_a_server/Debian.

I'm using a lxc conteneur and a reverse proxy to acces it. Port 30000 is forwarded to the minetest lxc.

In the lxc conteneur where minetest is installed :
-The server is running
-No errors in the log
-I got a error `connection timed out" when I tried to acces the server.

Here is my nginx config for the reverse proxy :

```
server {
listen 443 ssl;
# listen 30000;
server_name mine.gafamfree.party;
location /{
proxy_pass https://192.168.1.43;
proxy_redirect off;
proxy_set_header Host $http_host:443;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Url-Scheme $scheme;
}

ssl_certificate /certificates/mine/crt.pem;
ssl_certificate_key /certificates/mine/key.pem;

ssl_session_timeout 5m;
ssl_session_cache shared:SSL:50m;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ALL:!aNULL:!eNULL:!LOW:!EXP:!RC4:!3DES:+HIGH:+MEDIUM;
#add_header Strict-Transport-Security "max-age=31536000;";


}

server {
listen 80;
server_name mine.gafamfree.party;
location /{
rewrite ^/(.*)$ https://mine.gafamfree.party/$1 permanent;
}
}
```

Any idee ?

Thx :)
 

BuckarooBanzay
Member
 
Posts: 281
Joined: Tue Apr 24, 2018 05:58
Location: Switzerland
GitHub: thomasrudin-mt
In-game: BuckarooBanzai

Re: Serveur behind reverse proxy - connection timed out

by BuckarooBanzay » Mon Sep 02, 2019 16:22

You can't reverse proxy the minetest connection with nginx, its a custom UDP protocol.
If you are running your instance in a container then you just have to redirect port 30000 into the instance.

Please provide more infos about:
  • How you start your server
  • How your infrastructure looks like
  • How you connect to your server (ip/port)
 

petitminion
New member
 
Posts: 3
Joined: Mon Sep 02, 2019 14:48

Re: Serveur behind reverse proxy - connection timed out

by petitminion » Sun Sep 08, 2019 18:17

Thx for your help :)

* The minecraft server start automaticaly on boot with systemd
* I use proxmox to manage my lxc container. Proxmox is installed in a dedicated computer at home. All the containers are connected to internet through DHCP (managed by proxmox). My reverse proxy is installed in a lxc container. I have a livebox (orange), wich handle port redirection. So I can use the livebox rooter to redirect port 30000 directly to the minecraft container without using the reverse proxy.
* To connect to the minecraft container I use lxc-attach command from promox. But I can also configure a ssh connection if needed.
 

petitminion
New member
 
Posts: 3
Joined: Mon Sep 02, 2019 14:48

Re: Serveur behind reverse proxy - connection timed out

by petitminion » Tue Sep 10, 2019 19:37

oki it worked redirecting the trafic throught the routeur with port 30000 AND UDP protocol (which I didn't try before hehe)
Thx again ! :)
 


Return to Servers



Who is online

Users browsing this forum: No registered users and 8 guests