Limit room access based on login source?

Is there a way to limit which rooms are available based on login source? (either reported IP or reverse-proxy source)
Right now I have RC installed internally on a private IP, and am looking at exposing it so our users can log in from home - but if we do that I want a subset of rooms to be accessable.

Is this viable? I have a good understanding of how to set up a reverser with nginx or similar, I didn’t know if there was something I could use in the rewrites to do the limiting.

Thanks in advance for your input!

Server Setup Information

  • Version of Rocket.Chat Server: 3.6.2
  • Operating System: Debian 9
  • Deployment Method: SNAP
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v12.16.1
  • MongoDB Version: 3.6.14
  • Proxy: caddy
  • Firewalls involved: yes. Multiple public IPs possible