gcpfwup

PyPI

2 min read Original article ↗

Google Cloud Firewall Updater

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

Release files for gcpfwup 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gcpfwup 1.0.1
File Size Uploaded Provenance Actions
gcpfwup-1.0.1.tar.gz 12.0 kB Without provenance Details for gcpfwup-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gcpfwup 1.0.1
File Interpreter ABI Platform Actions Reset
gcpfwup-1.0.1-py3-none-any.whl 5.4 kB Without provenance Python 3 none any Details for gcpfwup-1.0.1-py3-none-any.whl

Total release size: 17.3 kB

Security for gcpfwup 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release