how to on ip forwarding on the existing instance vm

1,317 views
Skip to first unread message

Ahmet KOSALI

unread,
Mar 30, 2018, 8:50:11 AM3/30/18
to gce-discussion
"ip forwarding" is turned off in the virtual machine I installed and run. 
but now I want to make this feature open (ON) . How do I do it?

thank you very much for your support already
Ahmet Musa KOSALI

Fady (Google Cloud Platform)

unread,
Mar 30, 2018, 12:17:21 PM3/30/18
to gce-discussion

Hello Ahmet,


Per this document, “You can only set the canIpForward field at instance creation time. After an instance is created, the field becomes read-only.”  Hence, it is not possible to change it by editing the VM instance.


However, one workaround is by re-creating the instance from the existing VM instance’s boot disk, and the easiest way to do so is by:


(Note: recommended to take a snapshot of the boot disk before implementing this workaround)


  1. Edit the existing VM instance and uncheck “Delete boot disk when instance is deleted”

  2. Delete the current VM instance.

  3. Create a new instance with the same specs,same zone, with IP forwarding enabled, and selecting the old VM’s boot disk ( which should not be deleted per step 1) as a boot disk for the new one.


Alternatively, you may keep the existing instance, and create a new one with the same specs from a snapshot by following this document.


For further help, please post your question at serverfault.com where you have access to a large community of enthusiasts and experts to share ideas with, and get support from. I also found this similar answered question at this link that may help, and that you may comment at.


Reply all
Reply to author
Forward
0 new messages