We have recently installed Windows 7 for student computers. All student computers must be routed through our content filter which is located at This was done in WinXP by adding a Default Gateway in the network adapter settings > TCP/IP Properties > Advanced > Default Gateway. All teacher computers are routed through the DHCP assigned Default Gateway of

In WinXP the dhcp default gateway was correctly overridden by this manual setting. In Win7 it appears that the dhcp default gateway is retained and the manual one is added to the list so that there are two with the dhcp one having the primary metric.

I have tried several ways to remove the dhcp default gateway such as, running the "route delete" command. Doing this from an administrator command prompt works but it just resets upon reboot. I've tried adding this command to the registry's Run section but it seems to run as a non-administrator and therefore will not complete successfully.

Is there any way to prevent this and force the manual default gateway to override the dhcp one? Or to remove the dhcp assigned one automatically on boot/login?

HELP! We CANNOT allow student computers to connect to the internet without going through the content filter.


There are some solutions availible:

  • Don't use DHCP at all for the student PC (or the teacher's PC's, thanks for the comment) and set them manually by simply configuring the network settings on said computer by hand.


  • Hardcode ipadresses and default-gatewways in your DHCP-Server using the MAC-Adresses that your computers have, and make sure that your students can't change those.

or if your particular hardware/budget allows for that

  • separate VLANs with their own IP ranges and DHCP scopes.
  • 1
    Maybe i am missing something, but would it not be the better idea to do it the other way round? I suppose there are more student pcs than teacher pcs. So assign the filtered gateway through DHCP and assign the unfiltered one manually to the smaller share of machines. Nov 9 '12 at 15:31
  • Yes, of couse you can do it this way as well. Nov 9 '12 at 15:37
  • A more elegant solution would be to TURN OFF Win7 multi-gateway capabilities so that it works like WinXP did. Simple. But HOW?!?!
    – dgwilson
    Nov 9 '12 at 15:54
  • That's something i don't know about. Nov 9 '12 at 15:59

Surely the simple solution is to make the content filter the default gateway and either use a content filter that can identify users and assign different roles to different groups, or at the very least make the staff machines the ones that have the non-standard routing. The former method is certainly how we've been doing it.


I found a solution on my own. I added a logon.cmd script using the Local Group Policy Editor in the Computer Startup section (so it would run with Admin priviledges). The script contains the "route delete" command. Works great! I never did find a registry solution or any other way to mitigate this new feature in Win7. bleh!


In my case the redunant default gateway was due to the Bonjour Service that was installed along with Adobe CS Suite. The service was incorrectly installed and was named someting like ##Id_String1.6844F930_1628_4223_B5CC_5BB94B879762##.

To correct the problem disable the service. Make sure you disable the correct service, the service's executable is C:\Program Files\Bonjour\mdnsresponder.exe.

  • Open Services by typing services.msc at the command prompt (or via the menu in Administrative Tools)
  • Open the properties of the ##Id_String1... Service (or Bonjour Service) and set Startup Type to Disabled

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy