Serveur behind reverse proxy - connection timed out

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

Serveur behind reverse proxy - connection timed out

by petitminion » Post

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 :)

User avatar
BuckarooBanzay
Member
Posts: 437
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: Serveur behind reverse proxy - connection timed out

by BuckarooBanzay » Post

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)
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

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

Re: Serveur behind reverse proxy - connection timed out

by petitminion » Post

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 » Post

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

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests