CloudVE / CloudVE/cloudbridge

NATs & Private IPs

Open
#264 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
117
Forks
51
Avg merge
9h 17m
Merged PRs (30d)
5

Description

For GCP & AWS its relatively easy to patch the instance.create functions to support using internal IPs for VMs (I'll post some diffs later) but once you do this the VM can no longer access the internet. The solution is to create a NAT so I'm trying to look at how to implement this in each provider and if its each to patch cloudbridge to do so (I also responded to #170 mentioning this).

For GCP the change (which I've tested) seems to be very minimal. The following code works:

gr=provider.gcp_compute.routers()
nat_data = {'name': 'nat-cloudbridge-test',
'sourceSubnetworkIpRangesToNat': 'ALL_SUBNETWORKS_ALL_IP_RANGES',
'natIpAllocateOption': 'AUTO_ONLY',
'logConfig': {'enable': False, 'filter': 'ALL'},
'enableEndpointIndependentMapping': True}
gr.patch(project=provider.project_name, region=provider.region_name, router=router.name, body={'nats':[nat_data]}).execute()

Rather than a patch the above could simply be added to the router create rule depending on an optional arg?

I am investigating the equivalent for AWS (and will eventually for Azure as well). Is this something you would be interested in adding in?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.