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
Metadata
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)
| File | Size | Uploaded | |
|---|---|---|---|
| gcpfwup-1.0.1.tar.gz | 12.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gcpfwup-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.3 kB
Release files / gcpfwup-1.0.1.tar.gz
| Download URL | gcpfwup-1.0.1.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7dbcc5f4ab1e4325880d640b6e3df9e17bf6a3ecd38e1402a93f8723dab8b9cb
|
|
BLAKE2b-256 checksum How to use checksums |
7813836fda1209fcd68f334b64689a28a37ae75f1f1e856573286260ec341c09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.8
|
Release files / gcpfwup-1.0.1-py3-none-any.whl
| Download URL | gcpfwup-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
865abc4b5d1210e474b4f33ab9a96e59adf3ee41e34c2ef7a508f2af91a7f462
|
|
BLAKE2b-256 checksum How to use checksums |
1516a9dd260b82bae0ea3914de6c9eefa254477547fcbbf83adf814d374b0002
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.8
|