Disable changing proxy settings gpo

I've a created a gpo to specify the proxy settings and exceptions list which works great. I've also Enabled the "disable changing proxy settings" option.
Problem comes in when laptop users try to change the proxy settings for their 3G connections.
Can I find way to only apply this gpo when the users are connected to the domain (wired) or can I only apply the proxy setting via the gpo to the lan settings and NOT the dial-up and VPN settings?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Abhay PujariCommented:
You can apply GP to any users connected to domain. Once it is set at the domain level, local user can't change it. U can create a seperate OU for thiis and then apply GP to that OU.
Glen KnightCommented:
The way you would do it is to specify a PAC file as the automatic proxy script (like the example I have included in the code box.

This would then not use a proxy server when the user was not on the network.  Change the IP ranges to your internal network and also change the proxy servername.

If you store the PAC file on a network share this also means you can add exceptions for everyone that get processed immediately.

You would then need to make the GPO settings as per the settings below.
User Configuration > Windows Settings > Internet Explorer Maintenance > Connection and then under automatic broswer configuration specify the PAC file as per the image I have attached.

function FindProxyForURL(url, host)
// variable strings to return
var proxy_yes = "PROXY proxy.domain.com:8080";
var proxy_alternate = "PROXY";
var proxy_no = "DIRECT";
if (shExpMatch(url, "*")) { return proxy_no; }
if (shExpMatch(url, "http://itunes.apple.com/*")) { return proxy_alternate; }
// Proxy if PC is on local LAN
if (isInNet(myIpAddress(), "", ""))
return "PROXY proxy.domain.com:8080";
return "DIRECT";

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Glen KnightCommented:
forgot to say the location of the PAC file in the image is on a network drive mapped to L drive.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.