Accessing Mattermost via Multiple URLs within a LAN and Over the Internet?

I have a small Mattermost server that’s accessible over the internet via a Cloudflare Tunnel at https://mattermost.domain.tld. This setup works perfectly for external access. However, I’d like to expand the accessibility options for users within our LAN. Specifically, I aim to enable access to the same Mattermost server directly via an internal IP address (http[s]://192.168.0.200) and a LAN-specific domain (http[s]://mattermost.lan), in addition to the existing external URL.

Given that the Mattermost config.json file allows specifying only a single SiteURL (and similarly a single WebsocketURL), I’m exploring the best method to achieve this dual-access setup without compromising functionality or user experience.

Some considerations:

  • LAN access can be over HTTP, as it’s a highly trusted and very limited local network with a limited number of users. All LAN users are already system admins and it’s just a few folks.
  • I’m using pfSense for DNS and DHCP within the LAN, which gives some flexibility for DNS resolution and routing.
  • The goal is to maintain seamless user experience regardless of whether access is from within the LAN or over the internet.

I’d appreciate insights or recommendations on how others have approached a similar scenario.

Specifically:

  1. Are there recommended practices for configuring Mattermost or the network to handle multiple access URLs like this?
  2. Is there a preferred method to route LAN requests to the server without needing to modify the SiteURL in the Mattermost configuration?
  3. Has anyone successfully used reverse proxies, specific DNS configurations, or other network solutions to facilitate this kind of setup?

Appreciate any thoughts on this!