5

For a project I'm working on I'm looking for the ability to assign a specific ip to users when they start a terminal service session.

I'm using Windows Server 2008 R2 SP1 and I tried using Remote Desktop IP Virtualization but as far I understand it lets me only to enable the ability to assign a random ip to a session when the user access with or without a dhcp (changing some registry keys).

I need this to set up filtering rules per user on the project firewall.

EDIT

From what I understand there are a couple of dlls that handle (in "fake dhcp" mode, changing the registry keys) the ip assigment. If assign a static IP to an Users isn't actually supported, can a library be built from scratch to handle this situation and, if yes, when i can find some MS docs about these libraries (I refer to TSVIPool.dll and the second one that can be assigned to the key Control in the same registry path, I can't find the name)

2 Answers 2

0

If you have more than one network adaptor on the server, it apparently only supports per-program mode, not per-session mode. Might also be worth checking the DHCP server logs to see what mac addresses it's trying to get new leases with.

But yeah, the MS docs seem to indicate this is merely about getting apps that need a specific client port available working, not as a policy engine. Perhaps you could look into ident for windows and a firewall that supports that as an alternative?

1
  • A firewall that uses windows ident may be exposed to security problems. However i think that i'll use, in the end, a modified pfSense based firewall and a winlogon library to notify logins and logouts based on an ssl communication with preshared keys (so no keys exchange) ... this would supply a minimium security May 16, 2012 at 9:59
0

You could achieve what you want if the DHCP server is in your perimeter and that you control it. You would need to find the remote ip of the client during logon, and after you can reserve that IP in the DHCP.

An example below, dhcpserver.contoso.com is the dhcp server name.

PS C:> Get-DhcpServerv4Lease -ComputerName dhcpserver.contoso.com -IPAddress 10.10.10.11 | Add-DhcpServerv4Reservation -ComputerName dhcpserver.contoso.com

Please note, it's an old question, but the Terminal Server need to be in 2012 minimum to be able to use that powershell cmdlet, the target dhcp server can be in 2008R2.

To find the IP you might need a module like listed there, to issue like a Get-TSSession cmdlet

You must log in to answer this question.