Different IPs for different users

March 3, 2011 at 06:15:18
Specs: Windows XP
Hi
Let me explain my scenario.I have a user ABC(Admin Account) and XYZ(limited user). For both of them i would like to have two different ip configuration.

If ABC(Admin Account) logins he should have ip, gateway and dns1, dns2 and dns3.
If XYZ(limited user) logins he should have ip, gateway and dns1 only.

Is it possible to have above configuraions.

Quick responses will be highly appreciated


See More: Different IPs for different users

Report •

#1
March 3, 2011 at 06:57:01
What OS are you using on your Domain Controller? If it is Windows then you can setup Network Card configuration in the GPO for the Administrators group to set a static IP with static DNSs but this is dangerous because if more than one person logs in as administrator they will get an IP conflict.

I personally would solve this problem with a login script for the admin that would use a list of Static IPs that can be used, then ping each until it finds one that is not in use and use that one. It would be kind of a foe DHCP server just for people using that login script.

I don't have the exact script but here is one I put together a long time ago to configure NICs through logins...

Dim strIPAddress
Dim strSubnetMask
Dim strGateway
Dim intGatewayMetric
Dim strDns1
Dim strDns2

strIPAddress = "10.100.100.50"
strSubnetMask = "255.255.255.0"
strGateway = "10.100.100.2"
intGatewayMetric = 1
strDns1 = "10.100.100.9"
strDns2 = "10.100.100.10"

Set objShell = WScript.CreateObject("Wscript.Shell")
objShell.Run "netsh interface ip set address name=""Local Area Connection"" static " & strIPAddress & " " & strSubnetMask & " " & strGateway & " " & intGatewayMetric, 0, True
objShell.Run "netsh interface ip set dns name=""Local Area Connection"" static "& strDns1, 0, True
objShell.Run "netsh interface ip add dns name=""Local Area Connection"" addr="& strDns2, 0, True
Set objShell = Nothing
WScript.Quit

This script will set a static DNS and IP when the user logs in. You will need to post this in the programming forum to get some one to modify the code to make it so that it can use a list of static IPs and to use the next available.

I have tried this yet but in theory if you REM or remove this line...

objShell.Run "netsh interface ip set address name=""Local Area Connection"" static " & strIPAddress & " " & strSubnetMask & " " & strGateway & " " & intGatewayMetric, 0, True

it will just set a static DNS and use DHCP for the IP.


Report •

#2
March 3, 2011 at 08:42:36
hi thanks for quick response...both the users are in windows xp client system. I use Server 2K3 as server

Report •

#3
March 3, 2011 at 09:06:51

If you are trying to filter internet access this is what a proxy server is for like MS ISA server.

Answers are only as good as the information you provide.
How to properly post a question:
Sorry no tech support via PM's


Report •

Related Solutions

#4
March 3, 2011 at 19:34:07
Yes mine intention was to filter net access.. mine config stands below
ip ; 192.168.10.xx
subnet: 255.255.255.0
gateway: 192.168.10.1
dns; 192.168.10.5 --- ip of domain controller server 2003 as they are in domain
dns2: 65.83.8.8 dns given by isp for internet access
dns3: 65.83.8.9 dns given by isp for internet access

if a user has admin privileges he has to get all above configs. If he is a limited user he should not get DNS ips given by ISP, but he has to get 192.168.10.5 only.


Report •

Ask Question