Hardcode gmail IP


  • Hello Guys,

    Thanks in advance for the replies. We have a sort of issue where gmail doesn't open though a particular ISP. For a temporary fix we are trying to write static routes for gmail to route through alternate ISP. The issue is we are unable to obtain all gmail ips to write static route in a short time. We have a bunch of IPs which we have obtained and are sure it works. Hardcoding the host entries in /etc/hosts for gmail make sure the traffic is routed through our desired ISP. My question is how to hardcode these changes for all users in AD.

    I am sure there are lots of other methods to troubleshoot the issue, but i find this a easy temp solution till the issue is fixed. Kindly suggest.

    Many Thanks

    Tuesday, August 26, 2014 2:23 PM

All replies

  • Hi

    The challenge is Google have loads of IP's and they keep changing so it is difficult to hardcode the IP.

    In AD you can create a GPO to update/add entries to the hosts files:


    Hope this helps. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Tuesday, August 26, 2014 4:58 PM
  • Hello There, 

    Thanks for the reply, yes we are aware of the challenge. That's the reason we are trying to make host entries so that gmail resolves to particular ip and we could route it.

    I agree the method that you specified would create the host entry but it would affect the user even when he/she is not in our network. Eg. a laptop user after applying the GPO leaves home and works in his network still the host file remain. Is there any other workaround on this.  I am looking for some simple solution as this issue might get fixed in 1 or 2 days, and don't want to complicate it further.

    Many Thanks

    Tuesday, August 26, 2014 7:05 PM