Gongalong Posted June 20, 2012 Posted June 20, 2012 Hi folks, We've recently installed a new firewall/web filter, and are pointing all staff through it using a proxy server via group policy. The problem is for home use that no-one can access the Internet, as the PC is looking for the proxy. I'm hoping there's an easy answer to this. I note you can select both Automatically Detect Settings *and* the proxy server in IE. Would this work so that they would use the proxy if found, but failing that then connect directly, or is there another answer? I'm hoping someone has found a solution to this! TIA
tom_newton Posted June 20, 2012 Posted June 20, 2012 If you set "auto-detect", and use an auto-detection method (wpad, dhcp 252) in school, that should work ok. 1
Gongalong Posted June 20, 2012 Author Posted June 20, 2012 Thanks Tom. I'm not familiar with wpad or setting this via DHCP. Is it easy to do? (Ironically it's a Smoothwall we've now got!)
carvjo Posted June 20, 2012 Posted June 20, 2012 I agree - use WPAD.DAT or PROXY.PAC - I'm sure clever people here will give step-by-step how to do that with your smoothwall and what adpatations to make to DHCP.. or you could just put a vbs script in the startup: save this as proxy.vbs ' proxy.vbs ' VBScript to set proxy ' ---------------------------------------------------------------------- ' 13-08-08 hacked by JC - if the user is in the 172.16 subnet do nothing ' otherwise set the proxy to blank ' ---------------------------------------------------------------------- ' If the computer is in the subnet sIPSubnet then the proxy in sProxyUrl will be set ' otherwise it will use the default setting (which should be blanK) and proxy off ' ' ' On Error Resume Next Dim refWMI,sIPAddress,colNetworkAdapters,oNetworkAdapter,sIPSubnet,WshShell,sProxyPort sIPSubnet = "172.16." sProxyURL = "http://172.16.0.246" sProxyPort = "8881" 'Get IP Address and store it in sIPAddress Set refWMI = GetObject("WinMgmts:\\.\root\cimv2") Set colNetworkAdapters = refWMI.ExecQuery("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled=True") Set WshShell = CreateObject("Wscript.Shell") For Each oNetworkAdapter in colNetworkAdapters If oNetworkAdapter.IPAddress(0) <> "0.0.0.0" Then sIPAddress = oNetworkAdapter.IPAddress(0) Exit For End If Next 'Check to see if the IP address is in the affected subnet If InStr(sIPAddress,sIPSubnet) Then 'Set autoconfig URL ' WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer",sProxyURL & ":" & sProxyPort,"REG_SZ" ' WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable",1,"REG_DWORD" Else 'Clear autoconfig url WshShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer" WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable",0,"REG_DWORD" End If ' ------------------------------ ' note - uncomment the line below to setup the default route ' do this if setting sIPSubnet to a random value to turn off the proxy in our domain ' set objShell=CreateObject("Wscript.Shell") ' objShell.Run ("route add 0.0.0.0 mask 0.0.0.0 172.16.0.254") ' ------------------------------ 'Cleanup Set refWMI = Nothing Set colNetworkAdapters = Nothing Set WshShell = Nothing 3
Kitkatninja Posted June 20, 2012 Posted June 20, 2012 However where would you put proxy exceptions? 1
carvjo Posted June 20, 2012 Posted June 20, 2012 I suppose a line a bit like this? WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyOverride",10.0.*;moodle.xxxxxxxxx.org.uk;mail.xxxxxxxxxx.org.uk;intranet.xxxxxxxxxxx.org.uk;server-xs-*;,"REG_SZ" 1
AngryTechnician Posted June 20, 2012 Posted June 20, 2012 Thanks Tom. I'm not familiar with wpad or setting this via DHCP. Is it easy to do? (Ironically it's a Smoothwall we've now got!) If you have a Smoothwall there are settings on the device that can help with it, without the need to write your own scripts if I'm not mistaken. Give Smoothwall support a ring and they should be able to walk you through it. 2
tom_newton Posted June 20, 2012 Posted June 20, 2012 Proxy exceptions can go in the pac file. Pacific file is produced automatically by smoothwall device. A dns entry for wpad.yourdomain pointing at the smoothwall should work. 1
SHimmer45 Posted June 20, 2012 Posted June 20, 2012 For laptops which roam between home and school, we have a couple of shortcuts which apply some registry changes which the use can run depending on the location. not the most advanced method but works well enough (PAC setup would be more useful for changes to settings) 1
Gongalong Posted June 21, 2012 Author Posted June 21, 2012 Thanks all. If it's set by DHCP that sounds ideal, as I can then use automatic settings. It's surprising in a way there isn't a simpler way of achieving this, as it must be a common requirement. I'll back this up with Smoothwall support if need be.
Gongalong Posted June 25, 2012 Author Posted June 25, 2012 WPAD seems to have worked FWIW. Even if group policy doesn't...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now