I have hosted application using windows server manager on rdweb and give access to specific user group in active directory the access to the rdweb.
I want to restrict users to login only from specific gateways like user A,B,C can login only from 17.45.45.1. How this is possible?
First you need to create a user group for specific ip address , then when a user trying to access in your site you have to check there IP Address through
IPHostEntry Host = default(IPHostEntry);
string Hostname = null;
Hostname = System.Environment.MachineName;
Host = Dns.GetHostEntry(Hostname);
foreach (IPAddress IP in Host.AddressList) {
if (IP.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) {
IPAddress = Convert.ToString(IP);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With