Additional Internal IP on Compute Engine Instance / VM (Windows)

1,159 views
Skip to first unread message

Jack McCauley

unread,
Mar 24, 2017, 12:06:28 PM3/24/17
to gce-discussion
Hello wonderful, intelligent Google-ites!

I hope you're all having a good day.

My question - we're trying to create a Windows webserver with more than one 'internal' ip address.

I'm trying to build a webserver in Google Cloud Platform that hosts multiple websites (GBP, IE, FR, DK etc.)

Generally, we assign a range of IPs to the server statically, set the bindings in IIS, then loadbalance using a virtual IP.

It seems near enough impossible to assign another internal IP in GCP. Lots of guides about additional external IPs, but we don't want a public facing webserver like this.

Anybody have any idea on how to add additional internal IPs to a VM / Instance?

Also, I have tried changing the internal address I have assigned to the Instance to static in network adapter settings, next thing I know I can't access my VM for love nor money, had to delete and re-create. If I go into advanced settings to add additional static IPs, w'ere set to DHCP apparently, so can't add additional IPs.


Kind regards,

Jack McCauley

unread,
Mar 24, 2017, 12:14:14 PM3/24/17
to gce-discussion
Alternatively, if someone knows a work-around or another method of achieving this setup, I'm all ears :) I appreciate the platform is what it is. I'm just a bit green on how to use it.

Thanks.

Kamran (Google Cloud Support)

unread,
Mar 24, 2017, 10:26:54 PM3/24/17
to gce-dis...@googlegroups.com

Hello Jack,

You can add additional internal IP addresses to a VM instance. This is possible by enabling IP forwarding for the VM, creating a static network route, adding appropriate firewall rules, and setting additional internal IP addresses to network adapter of Windows. These steps are described in this article for Linux machines. The same steps are valid for Windows VMs. You will need to keep the initial internal IP address, subnet mask, gateway address and DNS settings of the adapter and manually enter them in properties of IPv4 of the network adapter. The below is a screenshot of my configuration on a VM instance (Windows 2008 R2) that perfectly works.



I hope this helps.

Jack McCauley

unread,
Mar 28, 2017, 4:42:03 AM3/28/17
to gce-discussion
Sweet, I'll give this a try. Thanks :)

Jack McCauley

unread,
Mar 29, 2017, 10:22:57 AM3/29/17
to gce-discussion
This worked for me :)

Before, when I had done this, I had changed the subnet to what I believed it should be, but seems the subnet address for all VMs is a /32.. gateway is the same as default.. 

Thanks again Kamran (Google Cloud Support)


On Saturday, March 25, 2017 at 2:26:54 AM UTC, Kamran (Google Cloud Support) wrote:
Reply all
Reply to author
Forward
0 new messages