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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dbcc5f4ab1e4325880d640b6e3df9e17bf6a3ecd38e1402a93f8723dab8b9cb |
|
MD5 | 750ce39b4695b655dde4f91caa7c81b5 |
|
BLAKE2b-256 | 7813836fda1209fcd68f334b64689a28a37ae75f1f1e856573286260ec341c09 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 865abc4b5d1210e474b4f33ab9a96e59adf3ee41e34c2ef7a508f2af91a7f462 |
|
MD5 | c3e4facc41ed4905897a4db5c883f5b0 |
|
BLAKE2b-256 | 1516a9dd260b82bae0ea3914de6c9eefa254477547fcbbf83adf814d374b0002 |