Is there a way to allow/deny specific users to connect from specified networks?

Hello!

Tell me please.
Is there a way to allow/deny specific users to connect from specified networks?

Case:
It is necessary to prohibit several users from connecting to Rocket.Chat from the Internet, but leave the option to connect to RC to all other users. These few users should be able to connect only from local corporate networks.

Thank you in advanced

I personally would just set up IPTABLES rules,
an easy approach would be:
iptables -I FORWARD -s IP.ADDRESS.GOES.HERE -j DROP

for instance, here’s a CIDR noted IP network on my personal BAN list:
iptables -I FORWARD -s 117.66.128.0/17 -j DROP

That would of course block all incoming traffic for the whole /17 network of that IP network and it is not per user.
I dont know any other way to prevent specific users to deny connecting from specific IPs or networks