Skip to main content

Firewall rule updater for Google Cloud Platform

Project description

Overview

A command-line utility to update Google Cloud Platform firewall rules. Particularly, source IP range for allow SSH rule.

Use case

Harden a virtual machine in Google Cloud by allowing only a single IP address to log in through SSH.

Installation

pip install gcpfwup

Requires Python 3.8 or newer. Depends on google-cloud-compute.

Usage

gcpfwup -v service_account_file.json

Target public IP: 101.35.101.248.
IP(s) allowed for SSH: 127.0.0.1.
Updating rule to allow only target IP address...
Done.

The only required argument is a path to Google service account JSON key file. You can download it from Google Cloud Console. It should be under IAM & Admin / Service Accounts and needs permissions for Google compute engine.

Help

gcpfwup --help

usage: gcpfwup [-h] [-v] [--ip IP] service_account_file

positional arguments:
  service_account_file  path to Google API service account JSON file

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         increase output verbosity
  --ip IP               use this IP instead of auto-resolved public IP

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gcpfwup-1.0.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

gcpfwup-1.0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file gcpfwup-1.0.1.tar.gz.

File metadata

  • Download URL: gcpfwup-1.0.1.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.8

File hashes

Hashes for gcpfwup-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7dbcc5f4ab1e4325880d640b6e3df9e17bf6a3ecd38e1402a93f8723dab8b9cb
MD5 750ce39b4695b655dde4f91caa7c81b5
BLAKE2b-256 7813836fda1209fcd68f334b64689a28a37ae75f1f1e856573286260ec341c09

See more details on using hashes here.

File details

Details for the file gcpfwup-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: gcpfwup-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.8

File hashes

Hashes for gcpfwup-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 865abc4b5d1210e474b4f33ab9a96e59adf3ee41e34c2ef7a508f2af91a7f462
MD5 c3e4facc41ed4905897a4db5c883f5b0
BLAKE2b-256 1516a9dd260b82bae0ea3914de6c9eefa254477547fcbbf83adf814d374b0002

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page