RocketChat / RocketChat/Rocket.Chat
Problem with a Nginx reverse proxy in a DMZ
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
I use Rocketchat in an environment where users connect from a remote access in a DMZ, their requests are redirected with a Nginx reverse proxy(IP=x.x.x.54) from the DMZ to a LAN where the Rocketchat server is hosted with Traefik (IP=x.x.x.81).
- My problem is that since upgrading to version 6.4.* users can no longer access Rocketchat from the DMZ via the reverse proxy. It worked in version 6.3.10.
- In version 6.4.*, users in the LAN can access rocketchat via Traefik.
- Looking at the dev tool on the browser of a user in the DMZ, I noticed that a request was made directly to the Rocketchat server via traefik without going through the Nginx reverse proxy. Except that from the DMZ direct access to the rocketchat server via Traefik is not authorised for users (logical operation for a DMZ).
- I could see that the request which is made in direct is the one which is informed in my docker-compose.yml in the variable ROOT_URL=x.x.x.81
Expected behaviour:
The request from the DMZ should not contact the x.x.x.81 IP but the DMZ x.x.x.54 IP.
Actual behaviour:
Server installation information:
- Rocket.Chat server version: 6.2.11
- Operating System: Ubuntu 20.04
- Deployment method: docker
- Number of instances running : 1
- DB Replicaset Oplog :
- NodeJS version : 14.21.3
- MongoDB version : 5.0.18
Client configuration information
- Version of desktop application or browser : Firefox 120.0
- Operating system :Ubuntu 22.04
Additional context
I've
also tested accessing my Nginx reverse proxy from the LAN and it works
fine when I allow myself temporary access to the Rocketchat server via
Traefik.
I could see that other people had a similar issue with the ROOT_URL here #29332
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the docker-compose.yml ROOT_URL setting and compare the reported 6.3.10 and 6.4.* behavior, using issue #29332 as related context. Reproduce the DMZ request through Nginx and verify that the generated request targets the DMZ proxy address rather than the internal Traefik address.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, nginx
- Domain
- infrastructure, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100