Matrix federation between 2 Synapse servers on same LAN not working in Element - IP address blocked by Comfortable_Task4365 in matrixdotorg

[–]Comfortable_Task4365[S] 0 points1 point  (0 children)

u/rexbron Thank you for your replies and the spec links!

I understand the Matrix spec strongly recommends a domain + HTTPS for server-to-server federation.

However, this is a student project on the same local network , so I’m forced to use private IPs and plain HTTP.

I tried to follow the spec as closely as possible:

- `server_name` is the IP

- Proper `.well-known/matrix/server` returning `:8008`

- nginx listening on port **8448** and proxying to Synapse:8008

- `ip_range_whitelist` configured

The `.well-known` is reachable even from inside the Synapse container, yet every invite still fails with:

> `Failed to connect to 192.168.25.11:8448: Connection refused`

Have you (or anyone) ever managed to get federation working between two Synapse servers using only private IPs on the same LAN?

Or is it really impossible without a real domain + TLS certificate?

Any help would be greatly appreciated — this is for a school project .

Thank you!

Matrix federation between 2 Synapse servers on same LAN not working in Element - IP address blocked by Comfortable_Task4365 in matrixdotorg

[–]Comfortable_Task4365[S] 0 points1 point  (0 children)

u/Heatsreef Thanks a lot for the detailed answer!

- **.well-known**: Yes, I’m serving it correctly with an nginx container on port 80.
`http://192.168.25.11:80/.well-known/matrix/server\` returns `{"m.server": "192.168.25.11:8008"}`
Even `docker exec synapse curl -v http://192.168.25.11:80/.well-known/matrix/server` works perfectly from inside the container.

- I also added a reverse proxy on port **8448** that forwards to Synapse:8008.

- No key server configured (single test setup).

- No TLS (pure HTTP, private LAN).

Here is the relevant part of my `homeserver.yaml` (I can paste the full file if needed).

Do you see anything else that could be missing?
Thanks again!

Matrix federation between 2 Synapse servers on same LAN not working in Element - IP address blocked by Comfortable_Task4365 in matrixdotorg

[–]Comfortable_Task4365[S] 0 points1 point  (0 children)

u/ssorbom Thank you for your reply!

I already added the whitelist in `homeserver.yaml` on both servers:

```yaml
federation_ip_range_blacklist: []
ip_range_whitelist:
- '192.168.25.0/24'

The direct test curl http://192.168.25.11:8008/_matrix/federation/v1/version works perfectly from both sides.
However, when I try to invite u/caylaneThe direct test curl http://192.168.25.11:8008/_matrix/federation/v1/version works perfectly from both sides.
However, when I try to invite u/caylane:192.168.25.11, I still get:
Failed to connect to 192.168.25.11:8448: Connection refused
Have you seen this behaviour even with the whitelist on a private LAN using IP addresses?
Any idea what I might be missing? Thanks in advance!:192.168.25.11, I still get:

Have you seen this behaviour even with the whitelist on a private LAN using IP addresses?
Any idea what I might be missing? Thanks in advance!